Skip to main content

A python implementation of urbit-ob

Project description

urbit-pob

A python implementation of urbit-ob

Module Use

The library exposes two families of functions:

  • patp / patp_to_num / patp_to_hex / hex_to_patp / is_valid_patp
  • patq / patq_to_num / patq_to_hex / hex_to_patq / is_valid_patq

As well as:

  • clan, for determining the ship class of a @p value
  • sein, for determining the parent of a @p value
  • eq_patq, for comparing @q values for equality
  • is_valid_pat, for a faster/weaker check of @p or @q-ness that only validates syllables (and not proper dash formatting)
>>> import urbitob
>>> urbitob.patp(314159)
'~batdyr-topmun'
>>> urbitob.patp_to_num("~faster-pollen")
2077885931
>>> urbitob.hex_to_patq("EFFACED")
'~wisfes-batsed'
>>> urbitob.sein("~hashes-happen")
'~hattug'
>>> urbitob.clan("~marzod")
'star'

Testing

A simple python -m unittest will run the test suite.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

urbitob-0.0.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file urbitob-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: urbitob-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for urbitob-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c769fc8dd2d7f02b6cdfd5d65c51f994d43c403af86b5bbe36be456f010ad4f
MD5 50ea5ffe7d36b7c7955577d54dae8ee7
BLAKE2b-256 31e1bce6df1b093fcb12cfc9665f9fa6b1c5e2f244f43ab7d8478a5e106c513a

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