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.0b2.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.0b2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pykon-0.1.0b2.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.0b2.tar.gz
Algorithm Hash digest
SHA256 f43104344289db143d600b3e134f293f4839140c639e0495386d4f4b497d98d8
MD5 5f4e01a2153d7e4ab2dc6e5bae2b6d01
BLAKE2b-256 cb8a77c94b2a948741ac63ad3671d6189f635495fc74b2849091ccf728739ceb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pykon-0.1.0b2-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.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 b1ae87060a9704e7940e02ccf9e32d20bec013f835e45329c5cad65dab16203b
MD5 b861772f65c6fd291b86d93bd054fecd
BLAKE2b-256 be9550c575969247b9fa331ea5f45f6c0aa7eb3167b6697026e08030f3d1d7fd

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