owned
A little tool to manage secrets.
The package uses the 'owner' library to embed information into byte content (weaving) and store it locally, as well as post the resulting hash to a blockchain for ownership verification. Includes helper functions to verify the posting of hashes on the blockchain.
To install: pip install owned
Main Functionalities
-
store_content(content, ...) -> str
- Optionally weaves metadata into the content (using 'owner') before storage.
- Saves the content in the ~/.config/owned folder under a file name derived from its hash.
- Returns the computed hash string (the 'key').
-
post_hash_to_blockchain(hash_str, provider_uri='http://127.0.0.1:8545', ...)
- Posts the hash to a chosen blockchain via web3.py.
- Returns transaction or logging information.
-
verify_hash_on_blockchain(hash_str, provider_uri='http://127.0.0.1:8545', ...)
- Verifies that a particular hash has been posted on the blockchain.
- Returns information such as block number, transaction details, or a boolean indicating presence.
Helper Functions
- DFLT_HASH: Default hashing function (sha256).
- weave_content(content, extra_info=None): Uses 'owner.HeadWeaver' to weave extra bytes into the content.
- unweave_content(woven_bytes): Recovers content and metadata from woven bytes.
- Additional internal functions for file handling and directory creation.
Examples
>>> from owned import store_content, unweave_content
>>> import os
Store some content (with weaving) and get its hash key.
>>> test_content = b"Hello, doctest!"
>>> key = store_content(test_content, extra_info=b"Extra info", use_weave=True)
Verify the file exists in ~/.config/owned
>>> file_path = os.path.expanduser(f"~/.config/owned/{key}")
>>> assert os.path.isfile(file_path)
Check the length of the SHA256 hash (64 hex chars).
>>> len(key)
64
Read the stored file and unweave the content.
>>> with open(file_path, "rb") as f:
... woven_data = f.read()
>>> original_content = unweave_content(woven_data)
>>> original_content == test_content
True
Metadata
Release files for owned 0.0.8
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 |
|---|---|---|---|---|
| owned-0.0.8.tar.gz | 282.8 kB | Without provenance | Details for owned-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| owned-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for owned-0.0.8-py3-none-any.whl |
Total release size: 293.9 kB
Release files / owned-0.0.8.tar.gz
| Download URL | owned-0.0.8.tar.gz |
|---|---|
| Size | 282.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44950e357a579195398bc7507ed36a9f9a031f8ead1b81478a6c5a1fb3822a15
|
|
BLAKE2b-256 checksum How to use checksums |
52e5f9ac520387fc6d04e1ccbb13d654b887495654d4e49c192235aff3469f32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / owned-0.0.8-py3-none-any.whl
| Download URL | owned-0.0.8-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb0c463a5af368197b12c92ece0d23b54c960b144eee54260f414cd81ebe07e6
|
|
BLAKE2b-256 checksum How to use checksums |
c54aca301108206a1bb5a65d4a785c43caad1430b3571441c678eeb093dcbca5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for owned 0.0.8
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.