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.3.4.tar.gz (35.9 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.3.4-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pccontext-0.3.4.tar.gz
  • Upload date:
  • Size: 35.9 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.3.4.tar.gz
Algorithm Hash digest
SHA256 31da075d1237d7cb0a271b96d2cb2217356ce2c76c5f1374522d4ecf3bbf9563
MD5 c397d3846459f6d5418bc69d7c9add35
BLAKE2b-256 63d4a76e5d8316269cb5d99462f01c5167418cfff3f88de92c3e39e0486f13f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pccontext-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 51.8 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.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4ec4d5ce65ba998b2b3acde6a4b73fa9ebcc2f425bb0ed224801aedd96f50344
MD5 d1de9c9bc6f8f270c3070c82f8c819be
BLAKE2b-256 0563c05664cf7874264f8b7affc3ce309fe23d18e880214eca53764dfd0037cf

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