Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grid3-0.1.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

grid3-0.1.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file grid3-0.1.2.tar.gz.

File metadata

  • Download URL: grid3-0.1.2.tar.gz
  • Upload date:
  • Size: 8.5 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

Hashes for grid3-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fba720abad6690f14c75917e142122df3632919d37978dc80e6309815bf03202
MD5 c79ef5bec6dc1b88d76b3271f5e6beb8
BLAKE2b-256 339efffad39ce084169c8fc3c249c3ea3b00529c2a36669cb583c98c3ca1c491

See more details on using hashes here.

File details

Details for the file grid3-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: grid3-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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

Hashes for grid3-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e7978b1a7f37a379e949e9e74d213dc418941c0b13d0f381132356b7a36f284f
MD5 460346c4ab6dddb2b5e88c81ec530a92
BLAKE2b-256 05738737c6e83f744e2056909fc5ca854e29015762cd4b544547b04b746619b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page