Skip to main content

A simple asynchronous httpx+pydantic wrapper over the E621's API

Project description

aioe621 uv

PyPI Python Version

GitHub License GitHub Actions Workflow Status

A simple asynchronous httpx+pydantic wrapper over the E621's API

Quickstart

from aioe621 import Client, Auth
from aioe621.schemas import Post
import asyncio

# authentication is only needed for some endpoints
auth = Auth(
    username="hexerade",
    api_key="1nHrmzmsvJf26EhU1F7CjnjC",
)

# all other Client parameters are also optional
client = Client(
    auth=auth,
    user_agent="MyProject/1.0 (by username on e621)"
)


async def main() -> None:
    post: Post = await client.posts.get(id=5937863)
    print(f"i love {post.tags.artist[0]}!!!")


asyncio.run(main())

Currently implemented

  • GET /posts.json via .posts.list
  • GET /posts/{id}.json via .posts.get
  • GET /posts/random.json via .posts.random

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

aioe621-0.2.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aioe621-0.2.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file aioe621-0.2.2.tar.gz.

File metadata

  • Download URL: aioe621-0.2.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aioe621-0.2.2.tar.gz
Algorithm Hash digest
SHA256 96ba00ce3ebea406cb7b493d1f685ab922c07b38c0d8cc49ed2abfaadc7538e8
MD5 1c4fe95b5f17ab7265048d6f68cf0f4a
BLAKE2b-256 61095f798f364055e3e2ed43c0cc69a57f801a4a0f826e92406646cdd5261a27

See more details on using hashes here.

File details

Details for the file aioe621-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: aioe621-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aioe621-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aeb937b4250225270814761e33926f2bd3f017675095fe4d9a1f137119c40ad2
MD5 5f437ae72c2e9322039ba8c3a4d6d05f
BLAKE2b-256 695829b3cfe0bdd87acb5ed4faffbe74bb811af245bebc1fa4da3ef83ead7dc1

See more details on using hashes here.

Supported by

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