Skip to main content

A module allowing for constant and publicly immutable data.

Project description

                    ██████╗ ██╗   ██╗██╗  ██╗ ██████╗ ███╗   ██╗
                    ██╔══██╗╚██╗ ██╔╝██║ ██╔╝██╔═══██╗████╗  ██║
                    ██████╔╝ ╚████╔╝ █████╔╝ ██║   ██║██╔██╗ ██║
                    ██╔═══╝   ╚██╔╝  ██╔═██╗ ██║   ██║██║╚██╗██║
                    ██║        ██║   ██║  ██╗╚██████╔╝██║ ╚████║
                    ╚═╝        ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝

Pykon is a way to allow constant and publicly immutable data.

Though, data can be modified its type cannot.

With Pykon, errors are returned rather than being raised

giving the user the ability to control when an error should be raised.

Example

from pykon import Pykon
from typing import Union

mylist: Union[Pykon, PykonError] = Pykon(list, [1,2,3,4])

if type(mylist) is Pykon.PykonError:
    raise mylist
else:
    print(mylist.data)

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

pykon-0.1.0b3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

pykon-0.1.0b3-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file pykon-0.1.0b3.tar.gz.

File metadata

  • Download URL: pykon-0.1.0b3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for pykon-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 a9d754e990e70c1a2370180358bb368a410c0ca119158d3e760637a7bb636e3f
MD5 1f51d920e3a1ba16248815fbeaa85c59
BLAKE2b-256 a6b99ee49a24c73f023048f4234d0e332a82b621211b7f272d06f8fdd493d0eb

See more details on using hashes here.

File details

Details for the file pykon-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: pykon-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for pykon-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf94021af66d9d8a0d8cc0acda48ec721521d5b799a3c1a48c790d816f418e34
MD5 5cfbdcca0625edc79123a45e3a174136
BLAKE2b-256 05e0900feaed1fca76274f26f56d3e741850e0621d2fc22cd330d297e6195337

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