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 Distribution

urbitob-0.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file urbitob-0.0.1.tar.gz.

File metadata

  • Download URL: urbitob-0.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.1

File hashes

Hashes for urbitob-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d4affa9fc85004b11ebcf834c1d5a8eed84d0672e05feae80f3e6bb36f070f17
MD5 c0eaf412160299b28076485b0322ad1a
BLAKE2b-256 f8a687497a5b3e9e186f178b7b52b7ce7c8a4479011d9fdfad1ab65fe902837d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: urbitob-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf7c9c0d5bb67d6fc2e26503f40b57d5b3233cb7c4869169661efd2ccf837c95
MD5 2448750dd45261c1564fa102826f22cd
BLAKE2b-256 bed19bcd819fc7151c2d8625623b2dabf1aa1186a44515cf0688b2c31367c1c6

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