Skip to main content

What is this?

This is a very simple python tool for creating namespaces. It tries to solve the problem that there is no elegant way to create singleton classes or nested namespaces in python.

How do I use this?

pip install simple_namespace

from simple_namespace import namespace

@namespace
def MyNamespace():
    my_value = 10
    def my_function(arg1):
        return 99

    return locals()

# prints 10
print(MyNamespace.my_value) 

Metadata

Release files for simple-namespace 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-namespace 1.0.0
File Size Uploaded Provenance Actions
simple_namespace-1.0.0.tar.gz 1.8 kB Without provenance Details for simple_namespace-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-namespace 1.0.0
File Interpreter ABI Platform Actions
simple_namespace-1.0.0-py3-none-any.whl Python 3 none any Details for simple_namespace-1.0.0-py3-none-any.whl

Total release size: 4.1 kB

Release files / simple_namespace-1.0.0.tar.gz

Download URL simple_namespace-1.0.0.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e7e2ff6900b9809822623674fc1e45b46f1188ee3fde46330c381500420f8e9e
BLAKE2b-256 checksum
How to use checksums
eaf7488729ab4ea72e9587e2dfb4a50599851b7394cde4112a1906d4020ab374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.6

Release files / simple_namespace-1.0.0-py3-none-any.whl

Download URL simple_namespace-1.0.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abbcb832ee44a6fbf4c0fa654388ad90d11297ab71b9d3d7bc4e2e882e57173f
BLAKE2b-256 checksum
How to use checksums
bcd56e19f6464e76ce710106aa222500c82198b0a74113ab96dd68285afd8fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.6

Security for simple-namespace 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page