Skip to main content

Async Python wrapper for the AfterShip API.

Project description

pyaftership

codecov python version PyPI Actions

Async Python wrapper for the AfterShip API

Installation

python3 -m pip install pyaftership

Example usage

Here is an example of what you can do, more examples can be found in the tests directory.

import asyncio
import aiohttp
from pyaftership import AfterShip

API_KEY = 'XXXXXXXX0000000000XXXXXXXX0000000XXXXX000'


async def example():
    """Get trackings."""
    async with aiohttp.ClientSession() as session:
        aftership = AfterShip(API_KEY, session)
        trackings = await aftership.trackings.list()
        print("Pending trackings:", trackings["trackings"])

asyncio.get_event_loop().run_until_complete(example())

Contribute

All contributions are welcome!

  1. Fork the repository
  2. Clone the repository locally and open the devcontainer or use GitHub codespaces
  3. Do your changes
  4. Lint the files with scripts/lint
  5. Ensure all tests passes with scripts/test
  6. Ensure 100% coverage with scripts/coverage
  7. Commit your work, and push it to GitHub
  8. Create a PR against the main branch

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

pyaftership-23.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

pyaftership-23.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pyaftership-23.1.0.tar.gz.

File metadata

  • Download URL: pyaftership-23.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for pyaftership-23.1.0.tar.gz
Algorithm Hash digest
SHA256 b1438bb40590c6528ef2dfaacf92e491f23efaecf119e3ecae5b0f9b4d863956
MD5 fd0ec94c660806364fa17e7fa664f180
BLAKE2b-256 c82767ef631c7fb50934dfe946aedcd75c3f2af60fe58a1e881511440fc3d94a

See more details on using hashes here.

File details

Details for the file pyaftership-23.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyaftership-23.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 316e4331f3ac28fd6eb144f72a253352b2092d3aa73ef2179c74511cfef98d96
MD5 72b7e28097d26a8e822a18bdd1145dc4
BLAKE2b-256 395494cb3fabeeccc842d4dd14ccab7731dedc8528c28418eab6ac27c3eba44b

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