Skip to main content

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

Project description

xkcd.py

A simple, easy-to-use xkcd wrapper


Documentation

Coming soon™

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pyxkcd-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyxkcd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a7b06efedf3e4aaa42fcd75d22366d1684d7cf8ffd1ce65ff27301968d20d95
MD5 6f97c54bffba747adfa9026ed5760636
BLAKE2b-256 350d5cc36f65204053aa0a1914c74491abf36b43093fc37904e052c2046f2729

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