Skip to main content

bitcoin jpegs

Project description

pypi

A sandbox for working with ord: pip install ordinals

For now, api calls go through https://ordapi.xyz/ but an official api is in the works. Will switch to that once available, or start wrapping the ord crate from python.

Setup

Clone, poetry install then pre-commit install.

poetry run pytest

Usage

All subject to change. Just exploring the api for now.

A simple example of iterating through inscriptions and printing any with plaintext content:

from ord import client

for i, inscription_id in client.inscriptions(start=0, stop=100):
    inscription = client.get_content(inscription_id)
    try:
        plaintext = inscription.decode("utf-8")
        print(i, inscription_id, "plaintext content")
        print(plaintext, "\n\n")
    except UnicodeDecodeError:
        pass

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

ordinals-0.0.13.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

ordinals-0.0.13-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

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