No project description provided
Project description
compute-horde
Receipts
Common django models
This library contains common Django models for the receipts.
To use them, update your INSTALLED_APPS:
INSTALLED_APPS = [
...,
'compute_horde.receipts',
...,
]
Migrations
To make new migrations after doing some changes in the model files, run:
DJANGO_SETTINGS_MODULE=compute_horde.settings uv run django-admin makemigrations
Blockchain
This library contains common logic for interacting with the blockchain (subtensor).
To use it, update your INSTALLED_APPS:
INSTALLED_APPS = [
...,
'compute_horde.blockchain',
...,
]
Block cache
This is a cheap-to-query store that stores the current block number.
Usage:
- Add
compute_horde.blockchain.tasks.update_block_cacheas a Celery Beat task with some reasonable frequency (like 6s)- Make sure to set the expires= option for the beat entry to about the same value to avoid the tasks piling up
- To get the current block number from cache, use
aget_current_block(orget_current_block).
Validators
This app contains common logic for updating validators of a given network.
To use it, update your INSTALLED_APPS:
INSTALLED_APPS = [
...,
'compute_horde.validators',
...,
]
Models
This app works with models from other projects; it doesn't define its own.
To use it, you need to specify COMPUTE_HORDE_VALIDATOR_MODEL in your settings.py,
in the form of <app_label>.<model_name>. This model must have at least two fields: public key (string) and active (bool).
Other settings are:
COMPUTE_HORDE_VALIDATOR_KEY_FIELD
COMPUTE_HORDE_VALIDATOR_ACTIVE_FIELD
COMPUTE_HORDE_VALIDATOR_DEBUG_FIELD # optional
BITTENSOR_NETUID
BITTENSOR_NETWORK
Tasks
There is a periodic task to update the validators in the database. To use it, define the settings above and add
compute_horde.validators.tasks.fetch_validators to your celery beat config.
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 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 compute_horde-0.0.26.tar.gz.
File metadata
- Download URL: compute_horde-0.0.26.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33d4adc3b91af65719eaf589f9bca9c8827193205598439f70c119870ef5672e
|
|
| MD5 |
5429adf89f1fcac54f914be510f263ed
|
|
| BLAKE2b-256 |
b869ad416b371c4ce5e5a64509ccd546316f6e18cf2c4e487dc78af7d532e49e
|
Provenance
The following attestation bundles were made for compute_horde-0.0.26.tar.gz:
Publisher:
library_cd.yml on backend-developers-ltd/ComputeHorde
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compute_horde-0.0.26.tar.gz -
Subject digest:
33d4adc3b91af65719eaf589f9bca9c8827193205598439f70c119870ef5672e - Sigstore transparency entry: 389363468
- Sigstore integration time:
-
Permalink:
backend-developers-ltd/ComputeHorde@05a8bbb269cfdaf105efd2499ef67a5589cff570 -
Branch / Tag:
refs/tags/library-v0.0.26 - Owner: https://github.com/backend-developers-ltd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
library_cd.yml@05a8bbb269cfdaf105efd2499ef67a5589cff570 -
Trigger Event:
push
-
Statement type:
File details
Details for the file compute_horde-0.0.26-py3-none-any.whl.
File metadata
- Download URL: compute_horde-0.0.26-py3-none-any.whl
- Upload date:
- Size: 46.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
123c15bc7ebe3b76e92c97158068bb4c9a838a86ba220ab2225e8df7263c9ba3
|
|
| MD5 |
9cab4187bf5459e3ad1c5fc5197d65bb
|
|
| BLAKE2b-256 |
820c54e4af9853125c6b2de2c78e5f5b745f932e407c6dca949a6322604706b7
|
Provenance
The following attestation bundles were made for compute_horde-0.0.26-py3-none-any.whl:
Publisher:
library_cd.yml on backend-developers-ltd/ComputeHorde
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
compute_horde-0.0.26-py3-none-any.whl -
Subject digest:
123c15bc7ebe3b76e92c97158068bb4c9a838a86ba220ab2225e8df7263c9ba3 - Sigstore transparency entry: 389363488
- Sigstore integration time:
-
Permalink:
backend-developers-ltd/ComputeHorde@05a8bbb269cfdaf105efd2499ef67a5589cff570 -
Branch / Tag:
refs/tags/library-v0.0.26 - Owner: https://github.com/backend-developers-ltd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
library_cd.yml@05a8bbb269cfdaf105efd2499ef67a5589cff570 -
Trigger Event:
push
-
Statement type: