Skip to main content

A simple, easy-to-use xkcd API wrapper!

Project description

pyxkcd

A simple, easy-to-use xkcd wrapper


Documentation

Check the documentation here

Quickstart

Sync mode:

import xkcd

client = xkcd.Client()

latest = client.latest()
print(latest.json())

Async mode:

import asyncio
import xkcd

client = xkcd.AsyncClient()

async def main():
    tasks = (client.random() for _ in range(25))
    return await asyncio.gather(*tasks)

asyncio.run(main())```

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

pyxkcd-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

pyxkcd-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pyxkcd-0.1.0.tar.gz.

File metadata

  • Download URL: pyxkcd-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pyxkcd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69b548a07e8dc7475c1dcc8fda990824775c8985c1e0de485a58a92042c95914
MD5 e0229dd664e9988b542ad0c86df7a7f2
BLAKE2b-256 c2007da9c5c9b66c582c88235d26c4d672d715dcbf075d91534d928b284a0c1d

See more details on using hashes here.

File details

Details for the file pyxkcd-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyxkcd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pyxkcd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f40b96aa11f67f3bb08062a08050ed19c1a57d95a52f7fa8d916d61cee21f5b3
MD5 fddba84d47b8b0995811c9bb2d002956
BLAKE2b-256 110173e3f81f9cdfab752a53b3535bb1bfd768882272f7951f75add02d1639bd

See more details on using hashes here.

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