Python client for the Hashiverse decentralized social network
Project description
hashiverse-client-python
Python client for the Hashiverse decentralized social network. Wraps the Rust hashiverse-lib via PyO3 for native performance.
Usage
with
maturin develop --release + pytest
Prerequisites
- Python 3.9+
- Rust nightly toolchain (see
rust-toolchain.tomlin workspace root)
Development build
cd hashiverse-rust/hashiverse-client-python
# Create and activate a virtual environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/macOS
source .venv/bin/activate
# Install maturin and build the extension into the venv
pip install maturin
maturin develop
maturin develop compiles the Rust code in debug mode and installs the resulting Python package into the active venv. Re-run it after any Rust code changes.
For a faster extension (recommended if testing PoW or network operations):
maturin develop --release
Production build
To build a distributable wheel:
maturin build --release
The wheel is written to target/wheels/ and can be installed with:
pip install target/wheels/hashiverse_client-*.whl
Running the example
The example connects to a local hashiverse server, creates an identity, fetches trending hashtags, and reads the #hashiverse timeline.
- Start a local server cluster using the test harness (in a separate terminal from the workspace root):
cd hashiverse-rust
cargo run -p hashiverse-integration-tests --bin test_harness
- Run the example:
cd hashiverse-rust/hashiverse-client-python
python examples/hello_hashiverse.py
Running tests
The test suite exercises offline client operations (no server required): identity creation, key management, and storage operations.
cd hashiverse-rust/hashiverse-client-python
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install pytest
maturin develop --release
python -m pytest tests/ -v
Quick start
from hashiverse_client import HashiverseClient
client = HashiverseClient.create_from_keyphrase(
key_phrase="my secret keyphrase",
data_dir="~/.hashiverse",
passphrase="my secret passphrase", # encrypts key files at rest (default: "" = no encryption)
)
print(client.client_id)
client.post("Hello from Python! #hashiverse-python")
timeline = client.get_hashtag_timeline("hashiverse-python")
for post in timeline.posts:
print(f"{post.client_id[:8]}: {post.post}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 hashiverse_client-1.0.3rc1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: hashiverse_client-1.0.3rc1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdeba9817bf7ce9a0f81de91afc93be0d10a4b51a76543a3b370b01fb72b9931
|
|
| MD5 |
11a60c05b1329e1aa54d54739c7c51c3
|
|
| BLAKE2b-256 |
b075aa512bd640ca1c820658b63fcd74bce7c72461737798575fe06b12aa5bb2
|
Provenance
The following attestation bundles were made for hashiverse_client-1.0.3rc1-cp39-abi3-win_amd64.whl:
Publisher:
publish-hashiverse-client-python.yml on hashiverse/hashiverse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hashiverse_client-1.0.3rc1-cp39-abi3-win_amd64.whl -
Subject digest:
fdeba9817bf7ce9a0f81de91afc93be0d10a4b51a76543a3b370b01fb72b9931 - Sigstore transparency entry: 1448945962
- Sigstore integration time:
-
Permalink:
hashiverse/hashiverse@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Branch / Tag:
refs/tags/v1.0.3-rc1 - Owner: https://github.com/hashiverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-hashiverse-client-python.yml@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
033be4f7e2a59c1b33cde314e3fb14519dadbbfe6f93b3e6d9b5827eae97f9ce
|
|
| MD5 |
e3aea3a15fbf8d4ab80e2cbdf0c8ff75
|
|
| BLAKE2b-256 |
c511537e9a7ad3ce4b53a753df4f9ee402e805fac3a080ea6532427edb40ac70
|
Provenance
The following attestation bundles were made for hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-hashiverse-client-python.yml on hashiverse/hashiverse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
033be4f7e2a59c1b33cde314e3fb14519dadbbfe6f93b3e6d9b5827eae97f9ce - Sigstore transparency entry: 1448946184
- Sigstore integration time:
-
Permalink:
hashiverse/hashiverse@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Branch / Tag:
refs/tags/v1.0.3-rc1 - Owner: https://github.com/hashiverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-hashiverse-client-python.yml@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0bfbe83179df52a73b7003f9172bcb02b61547bb36a3049e208e98e526562b5
|
|
| MD5 |
f4afeb77c8441b15be4c07f80a35dbf4
|
|
| BLAKE2b-256 |
298841348e7d1d13ef0fecfa328df11823c9c677dbe7fcb66288e9d8f37a35e8
|
Provenance
The following attestation bundles were made for hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
publish-hashiverse-client-python.yml on hashiverse/hashiverse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hashiverse_client-1.0.3rc1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
f0bfbe83179df52a73b7003f9172bcb02b61547bb36a3049e208e98e526562b5 - Sigstore transparency entry: 1448946103
- Sigstore integration time:
-
Permalink:
hashiverse/hashiverse@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Branch / Tag:
refs/tags/v1.0.3-rc1 - Owner: https://github.com/hashiverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-hashiverse-client-python.yml@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file hashiverse_client-1.0.3rc1-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: hashiverse_client-1.0.3rc1-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f35faef6291b8319349eae8d9d1ac4980e8e50745eb9b14552e5ab4f949a11f5
|
|
| MD5 |
c398c5beb5d8338128cf9d17ad924e9d
|
|
| BLAKE2b-256 |
75f13c5d5983713e6a363471454277bd2d9571ca7c588d439dc3265dffbdd33f
|
Provenance
The following attestation bundles were made for hashiverse_client-1.0.3rc1-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-hashiverse-client-python.yml on hashiverse/hashiverse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hashiverse_client-1.0.3rc1-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
f35faef6291b8319349eae8d9d1ac4980e8e50745eb9b14552e5ab4f949a11f5 - Sigstore transparency entry: 1448946014
- Sigstore integration time:
-
Permalink:
hashiverse/hashiverse@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Branch / Tag:
refs/tags/v1.0.3-rc1 - Owner: https://github.com/hashiverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-hashiverse-client-python.yml@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file hashiverse_client-1.0.3rc1-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: hashiverse_client-1.0.3rc1-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c598b5b8c72b399f043e7c3a07fea2f2dd1ffcbeef9b2af92fa3d84611b29f9
|
|
| MD5 |
d92356c470bc73219550e4b7ce52183c
|
|
| BLAKE2b-256 |
b8ed148a3891083663a6f925fa82e3a00a80f8fd238215745feb2d8fe4e0add5
|
Provenance
The following attestation bundles were made for hashiverse_client-1.0.3rc1-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-hashiverse-client-python.yml on hashiverse/hashiverse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hashiverse_client-1.0.3rc1-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
9c598b5b8c72b399f043e7c3a07fea2f2dd1ffcbeef9b2af92fa3d84611b29f9 - Sigstore transparency entry: 1448945866
- Sigstore integration time:
-
Permalink:
hashiverse/hashiverse@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Branch / Tag:
refs/tags/v1.0.3-rc1 - Owner: https://github.com/hashiverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-hashiverse-client-python.yml@d56d92d42ec0c23cbe420fb0f6172e2c19477c7f -
Trigger Event:
release
-
Statement type: