Skip to main content

Python bindings for Arcane

Project description

Axew

A set of python bindings for Arcane featuring sane error handling and caching to reduce requests.

from axew import AxewClient, Entry


def main():
    client: AxewClient = AxewClient()
    entry: Entry = client.create_paste(
        code="Testing", 
        error="My error", 
        name="My code", 
        description="It does this and that."
    )
    print(entry.resolve_url())

    # Returns the cached entry and saves making a request
    cached_entry = client.get_paste(entry.slug)
    print(cached_entry)


async def async_main():
    client: AxewClient = AxewClient()
    entry: Entry = await client.async_create_paste(code="Async testing", error="My error")
    print(entry.resolve_url())

    # Returns the cached entry and saves making a request
    cached_entry = await client.async_get_paste(entry.slug)
    print(cached_entry)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axew-1.0.7.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

axew-1.0.7-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page