axew

Python bindings for Arcane


License
MIT
Install
pip install axew==1.0.7

Documentation

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)