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.2.2.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

pccontext-0.2.2-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pccontext-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0eeb934b9d01f31db6c1db4dcdfdb80d5eecc08bc883782d51249af21569a1d2
MD5 200afbb49937b8bcd65999f2d25813f0
BLAKE2b-256 8d608e65536654d204226b4a4022a2987626c2532381d05e6a3fbad8a47a63ae

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pccontext-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4cfd0c1b98bfd1402fff92f501a15eea7f3767dd2378e4d684038dabc76e5b97
MD5 15b191da317c85b3761c3baad049addb
BLAKE2b-256 bd077c4a534f9eef0b87957e80275193b3267e4e3b62326243e7320cb7d4784a

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