Skip to main content

Chain Contexts for PyCardano library

Project description

PyCardano Chain Contexts

This library contains the various Chain Contexts to use with the PyCardano library.

Basic Usage

Blockfrost

from pccontext import BlockFrostChainContext
from blockfrost import ApiUrls

chain_context = BlockFrostChainContext(
    project_id="your_project_id",
    base_url=ApiUrls.mainnet.value
)

Cardano-CLI

from pccontext import CardanoCliChainContext, CardanoCliNetwork
from pathlib import Path

chain_context = CardanoCliChainContext(
            binary=Path("cardano-cli"),
            socket=Path("node.socket"),
            config_file=Path("config.json"),
            network=CardanoCliNetwork.MAINNET,
)

Koios

from pccontext import KoiosChainContext

chain_context = KoiosChainContext(api_key="api_key")

Ogmios

from pccontext import OgmiosChainContext

chain_context = OgmiosChainContext(host="localhost", port=1337)

Kupo

from pccontext import OgmiosChainContext, KupoChainContextExtension

ogmios_chain_context = OgmiosChainContext(host="localhost", port=1337)
chain_context = KupoChainContextExtension(wrapped_backend=ogmios_chain_context)

Offline Transfer File

from pathlib import Path
from pccontext import OfflineTransferFileContext

chain_context = OfflineTransferFileContext(offline_transfer_file=Path("offline-transfer.json"))

Yaci Devkit

from pccontext import YaciDevkitChainContext

chain_context = YaciDevkitChainContext(api_url="http://localhost:8080")

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

pccontext-0.4.1.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pccontext-0.4.1-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file pccontext-0.4.1.tar.gz.

File metadata

  • Download URL: pccontext-0.4.1.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.4.0

File hashes

Hashes for pccontext-0.4.1.tar.gz
Algorithm Hash digest
SHA256 957b21e4ec30ebc803300c9e0a8884c16cbff62a4caa5ad553ef82c02a4d1cbe
MD5 54a0de7bac34b3059826ec188d6b8d45
BLAKE2b-256 16082be9cfcbe22b2248c9210646dc47fc3acf3212506139a799d072bd476355

See more details on using hashes here.

File details

Details for the file pccontext-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: pccontext-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.10 Darwin/24.4.0

File hashes

Hashes for pccontext-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a87d60c305c7d7fde96c54191c465c1565dbf7e3e951a3ea5bb98cd7ff8e5fea
MD5 850291e7a13c3b40b5500774af38a89d
BLAKE2b-256 5ae7412c00c29065b33298c03a72d85100f660c82eaa7d4c83a199919c7c550b

See more details on using hashes here.

Supported by

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