Metadata-Version: 2.4
Name: codetable
Version: 1.0.0
Summary: Codetable is a lightweight package for seamlessly setting up codes, such as those used in API responses.
Home-page: https://github.com/0x1618/codetable
Author: Maksymilian Sawicz
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

```python
from codetable import Code, Codes, msg


class UserErrorCodes(Codes):
    NAMESPACE: str = "user"

    ALREADY_EXISTS: Code
    DOES_NOT_EXIST: Code = msg("User does not exist.")


print("# ALREADY_EXISTS\n")
print("obj:", UserErrorCodes.ALREADY_EXISTS)
print("code:", UserErrorCodes.ALREADY_EXISTS.code)
print("msg:", UserErrorCodes.ALREADY_EXISTS.msg)

print("\n# DOES_NOT_EXIST\n")
print("obj:", UserErrorCodes.DOES_NOT_EXIST)
print("code:", UserErrorCodes.DOES_NOT_EXIST.code)
print("msg:", UserErrorCodes.DOES_NOT_EXIST.msg)

# # ALREADY_EXISTS

# obj: Code(code='user_already_exists', msg=None)
# code: user_already_exists
# msg: None

# # DOES_NOT_EXIST

# obj: Code(code='user_does_not_exist', msg='User does not exist.')
# code: user_does_not_exist
# msg: User does not exist.
```
