Yuck!
Yuck! is a library that is helpful when you need to create a singleton instance of a function.
Just decorate the function you want to singletonize, call it once with setup arguments and subsequent calls will use the already setup function call.
Example
from yuck import yuck
@yuck
def db(connection_string: str):
connection = connect(connection_string)
query = yield
while True:
query = yield connection.execute(query)
# Initial setup
db_instance = db("sqlite:///:memory:")
# Use the singleton instance
result = db_instance.send("SELECT * FROM users")
print(result)
NOTE: I'm not entirely sure this really works but I'm too lazy to even check :D.
Metadata
Release files for pyuck 0.1.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 |
|---|---|---|---|---|
| pyuck-0.1.0.tar.gz | 2.7 kB | Without provenance | Details for pyuck-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyuck-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyuck-0.1.0-py3-none-any.whl |
Total release size: 5.9 kB
Release files / pyuck-0.1.0.tar.gz
| Download URL | pyuck-0.1.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9501d54946b544ffb1152429f6622ba4063dd5fe5a0424a39f48b094aaac11c0
|
|
BLAKE2b-256 checksum How to use checksums |
7b234b2078e0544606dd50778acb6e73d238a40362a28e291426586a7d7894bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / pyuck-0.1.0-py3-none-any.whl
| Download URL | pyuck-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46f4cabd97e09bdf0a19464ef8fdd8249a67819cc8922e25063fe48ae632a751
|
|
BLAKE2b-256 checksum How to use checksums |
2ac431ff4cb574005ccfcf2114df82de992a705644771145d3ae677b199d2b39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for pyuck 0.1.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.