Modules for interacting with ThreeFold Grid v3.
Project description
Grid3.py
This is a collection of Python modules for working with ThreeFold Grid v3. It's designed foremostly for interactive use on the REPL and joyful scripting. We value conciseness and trying to do what you meant even at the expense of a few extra CPU cycles.
If you're looking for a Grid v3 SDK for writing efficient and maintainable code bases, check out Go or Rust. For code that must execute in the user's browser, see Typescript.
Installation
You can install the latest release from PyPI using pip
(adjust the virtual environment bits to your preferences and shell as needed):
python -m venv venv
source venv/bin/activate
pip install grid3
Quick tour
With grid3.py, you can easily answer questions like, how many nodes are currently in the standby state that were online in the last 36 hours?
import time, grid3.network
mainnet = grid3.network.GridNetwork()
sleepers = mainnet.graphql.nodes(['nodeID'], power={'state': 'Down'}, updatedAt_gt=int(time.time()) - 24 * 60 * 60)
len(sleepers)
We just executed a query against the mainnet GraphQL endpoint nodes
without even sweating a line break. Pretty cool!
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
File details
Details for the file grid3-0.1.3.tar.gz
.
File metadata
- Download URL: grid3-0.1.3.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.5-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266a1e9252f89222add596221abeab00b3c4f4e87224184e9a8d58ce09c25511 |
|
MD5 | 7f9234de52b7537105abc0c8a0aa861d |
|
BLAKE2b-256 | 8b757cfdf9d33428be6151946c79a07de97edf46b3b2a5be900874dd60ab8e26 |
File details
Details for the file grid3-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: grid3-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.5-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b79920ddd9159bae53de6ee02546239d8522769b433146906b9bc527d2aff50 |
|
MD5 | a5fb8ec424eced1ccc836bc2e182453d |
|
BLAKE2b-256 | ece15bccbdff560443f9955186a99c86efdb5faea0135581dffffff2a21ea3cc |