aioseinfeld
What's the deal with asyncio?
Install
aioseinfeld requires Python 3.7 or newer. It can be installed from PyPI:
$ pip install aioseinfeld
aioseinfeld also depends on having a copy of the script database generated using scripts by Colin Pollick. You can build your own copy using those scripts, or download a prebuilt copy with the following command:
$ wget https://noswap.com/pub/seinfeld.db
Usage
aioseinfeld uses context managers to wrap the underlying sqlite database connection.
Create the Seinfeld object by passing the path to the seinfeld.db database:
from aioseinfeld import Seinfeld
async with Seinfeld(db_path) as seinfeld:
...
Get information on individual episodes or seasons:
async with Seinfeld(db_path) as seinfeld:
season = await seinfeld.season(1)
episodes = await season.episodes
episodes[0].title # "Good News, Bad News"
episodes[0].writers # ["Jerry Seinfeld"]
episodes[0].date # date(1990, 6, 14)
Quotes can be retrieved by unique ID:
async with Seinfeld(db_path) as seinfeld:
quote = await seinfeld.quote(34665)
quote.speaker.name # "George"
quote.episode.title # "The Pitch"
quote.text # "The show is about nothing."
Quotes can also be found by searching:
async with Seinfeld(db_path) as seinfeld:
await seinfeld.search(speaker="Jerry", subject="keys") # [Quote(...), ...]
You can even get random quotes with optional search parameters:
async with Seinfeld(db_path) as seinfeld:
await seinfeld.random() # Quote(...)
await seinfeld.random(subject="parking") # Quote(...)
If you want more context around a quote, passages help:
async with Seinfeld(db_path) as seinfeld:
quote = await seinfeld.random()
passage = await seinfeld.passage(quote, length=5)
passage.quotes # [Quote(...), ...]
License
aiomultiprocess is copyright John Reese, and licensed under
the MIT license. I am providing code in this repository to you under an open
source license. This is my personal repository; the license you receive to
my code is from me and not from my employer. See the LICENSE file for details.
Metadata
Release files for aioseinfeld 0.2.0
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 |
|---|---|---|---|---|
| aioseinfeld-0.2.0.tar.gz | 8.3 kB | Without provenance | Details for aioseinfeld-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioseinfeld-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for aioseinfeld-0.2.0-py3-none-any.whl |
Total release size: 16.6 kB
Release files / aioseinfeld-0.2.0.tar.gz
| Download URL | aioseinfeld-0.2.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f5ae5cbb8235fe58aebf1f49e1cce1534977a451c0cd2902722d8711c6b030b
|
|
BLAKE2b-256 checksum How to use checksums |
d05b9ffdab225b23b4f3976e6690559182c073d9ea79995dd54d61d0d5e25d2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.0
|
Release files / aioseinfeld-0.2.0-py3-none-any.whl
| Download URL | aioseinfeld-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aca7e444ab45dad062696e296a6ee70f7611dc784011419d79997a8470fd4814
|
|
BLAKE2b-256 checksum How to use checksums |
0e44dc7cc51a8cce907934d114f721a7a038bda49435f8e31386c0d0627e7c09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.25.0
|
Security for aioseinfeld 0.2.0
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.