A Python wrapper for tracking delivery!
Project description
Sheepped
🚚 A Python wrapper for tracking delivery (e.g. USPS).
Getting Started
First, install the package from PyPI using pip
.
$ pip install sheepeed
Now, register at USPS to get your USPS_USER_ID
.
Usage
Suppose you have set an environment variable USPS_USER_ID
with your USPS ID and your tracking number is 42
:
from sheepped import USPS
usps = USPS()
usps.track("42")
If you have a bucnh of tracking numbers, you might want to use the async API:
import asyncio
from sheepped import USPS
usps = USPS()
async def main():
tracking_numbers = ("1", "2", "3", "5", "8", "13", "21")
tasks = tuple(usps.aiotrack(n) for n in tracking_numbers)
return await asyncio.gather(*tasks)
asyncio.run(main())
Tests
$ python setup.py test
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
sheepped-0.1.3.tar.gz
(2.3 kB
view details)
File details
Details for the file sheepped-0.1.3.tar.gz
.
File metadata
- Download URL: sheepped-0.1.3.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a4ded4a40306b8efd31eebadadd5d1e70066d7735ac8748fbab4724579cc39c |
|
MD5 | 2338bf951d24b15ab8e02fc0b4e0870e |
|
BLAKE2b-256 | 7c6cc8610026da4ec42ca86df3c4965688f66f7dd7705455198c10928c089678 |