No project description provided
Project description
aresource
A Python project for resource management.
Project Structure
src/
aresource/
tests/
Installation
Use pip to install released version:
pip install aresource
Use Poetry to install local version:
poetry install
Usage
Example of usage. Load config and use it to initialize new session
import asyncio
from collections.abc import AsyncIterator
from contextlib import asynccontextmanager
from io import TextIOBase
from aresource import callback_context_resource, ResourceManager
class Manager(ResourceManager):
@callback_context_resource
async def file(self) -> AsyncIterator[TextIOBase]:
with open("config.txt", "w") as f:
yield f
async def main() -> None:
async with Manager() as mng:
mng.file.write("Hello, World!")
if __name__ == "__main__":
asyncio.run(main())
Testing
Run tests with:
poetry run pytest
Code Quality
Command to format and lint code:
poetry run ruff format .
poetry run ruff check --fix
poetry run mypy .
License
MIT License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aresource-0.1.1.tar.gz.
File metadata
- Download URL: aresource-0.1.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
913bd9a0e336fcb92030440014bc54bd4434b6aa4eebf259e2a186d8be1f972c
|
|
| MD5 |
8b4915577e8679e18231de5430a669c8
|
|
| BLAKE2b-256 |
c3b043db470c53c92cee889aa68f70ac24f40ee06654bd52a895e775bc15a1d1
|
Provenance
The following attestation bundles were made for aresource-0.1.1.tar.gz:
Publisher:
release.yml on xbabka01/aresource
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aresource-0.1.1.tar.gz -
Subject digest:
913bd9a0e336fcb92030440014bc54bd4434b6aa4eebf259e2a186d8be1f972c - Sigstore transparency entry: 992489645
- Sigstore integration time:
-
Permalink:
xbabka01/aresource@d7bb3bac60b37584c5914cc04e80d366dff0faf1 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/xbabka01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d7bb3bac60b37584c5914cc04e80d366dff0faf1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aresource-0.1.1-py3-none-any.whl.
File metadata
- Download URL: aresource-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23f5e229a54a52f107dc1af12465db1cb47f7d32aebd6bd10af36bde49f6d3d1
|
|
| MD5 |
e450f6d4cfedc195f376837dd54ba31a
|
|
| BLAKE2b-256 |
29cbd1c5d9a4db48fbd7a74112ced92c44adb9ce9ffbb1d8441eb58d2764c638
|
Provenance
The following attestation bundles were made for aresource-0.1.1-py3-none-any.whl:
Publisher:
release.yml on xbabka01/aresource
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aresource-0.1.1-py3-none-any.whl -
Subject digest:
23f5e229a54a52f107dc1af12465db1cb47f7d32aebd6bd10af36bde49f6d3d1 - Sigstore transparency entry: 992489652
- Sigstore integration time:
-
Permalink:
xbabka01/aresource@d7bb3bac60b37584c5914cc04e80d366dff0faf1 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/xbabka01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d7bb3bac60b37584c5914cc04e80d366dff0faf1 -
Trigger Event:
push
-
Statement type: