aio-omdb
Asyncronous and synchronous Python clients for OMDb (the Open Movie Database).
Usage
from aio_omdb.client import AsyncOMDBClient, SyncOMDBClient
OMDB_API_KEY = '...' # Get your key from OMDB
a_client = AsyncOMDBClient(api_key=OMDB_API_KEY)
s_client = SyncOMDBClient(api_key=OMDB_API_KEY)
# Client provides the following methods:
# Get by IMDB ID
await a_client.get_by_id('tt1000252')
s_client.get_by_id('tt1000252')
# Get by exact title
await a_client.get_by_id('Rome, open city')
s_client.get_by_id('Rome, open city')
# Search title by a word or phrase
await a_client.search('Spock')
s_client.search('Spock')
The following exceptions may be raised:
aio_omdb.exc.InvalidAPIKey: if an invalid API key is used;aio_omdb.exc.MovieNotFound: if no movie can be found inget_by_idorget_by_title.
Testing
- Install the
testingextras
pip install -Ue .[testing]
- Create file
.envin the project root and put your OMDb API key there:
OMDB_API_KEY=<your API key>
- Run tests
make test
Enjoy!
Metadata
Release files for aio-omdb 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aio-omdb-0.0.3.tar.gz | 5.7 kB | Without provenance | Details for aio-omdb-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aio_omdb-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for aio_omdb-0.0.3-py3-none-any.whl |
Total release size: 11.3 kB
Release files / aio-omdb-0.0.3.tar.gz
| Download URL | aio-omdb-0.0.3.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
925879d18c78dce69f59acbe27e938a9910ab3f3cd7c19fa6225098ac6dac0f2
|
|
BLAKE2b-256 checksum How to use checksums |
6f253a51bc5e5fc9eae30d3f67633c020936b7df561f077858bdadb240de2491
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Release files / aio_omdb-0.0.3-py3-none-any.whl
| Download URL | aio_omdb-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d46087c4b466f076ee4a767566769289f59de2f056f28f18d1aa8f3d9c53633
|
|
BLAKE2b-256 checksum How to use checksums |
49f88a975a9301041fd4dcf2653529a76f3b9b6291bc334be7f0c8a9e80383dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Security for aio-omdb 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.