Python package for zapp
Project description
A fast python public API generator built in rust 🦀.
Key Features • How To Use • Credits • Related • License
Key Features
Zapp is a Python tool to automatically generate and maintain python module interfaces, written in Rust.
Zapp is inspired by the modular monolith architecture and is designed to compliment the awesome tach package.
Zapp is:
- 🌎 Open source
- 🐍 Installable via pip
- 🦀 Implemented in rust
Why?
I love Python as a language; however, after working across several large enterprise code bases in several languages (C++ 💻, C# ⚙️, TypeScript 🌐, Rust 🦀, Python 🐍, ...) I have found pythons flexibility, simplicity and rich ecosystem is great for rapid prototyping and development but recurringly introduces challenges in enforcing clean module boundaries and interfaces, especially as projects grow.
Python has no native interface enforcement between whether objects are public, protected, private and whether
the object is exported in a modules interface. Instead, all attributes and methods are public by default - there's only a naming convention (_single_underscore) to signal "this is internal", but nothing stops anyone from using it.
As a python project grows you often end up with deep directory structures (package.submodule.subsubmodule) and I commonly see this lead to:
- ♻️ Circular dependencies from sibling modules importing each other
- 🧩 Lots of internal utility functions that aren’t clearly distinguished from the public API.
Without clear boundaries developers often start importing from anywhere:
from package.deeply.nested.internal_module import kinda_private_function
Now you're coupled to internals — and changes in one submodule ripple across the codebase; making things harder to maintain.
👷 So what can we do?
First of all check out tach - it adds a lot of features to help tackle the aforementioned issues.
So where does ⚡️ Zapp 🐍 fit in?
In python you can use __all__ = [...] and __init__.py to signal the public api and then you can use tach to enforce that consumers of your library
within a monolithic code base this public api. However, for a deeply nested lib it can still be arduous to manually keep in sync these at the top level with the submodules in the lib itself.
Zapp makes this process more ergonomic by recursively iterating through the path to a provided python directory and automatically
populating the init files based on the __all__ = [...] in each individual python file. If the file does not contain this list
then the public api will be implicitly determined based on the assumption that object prefixed with a underscore are private.
How To Use
Install via pip:
pip install python-zapp
Run directly from your python environment:
zapp my_python_package
And then package will be recursed and the init files will be populated with the public api.
Credits
This software uses the following open source packages:
Related
License
MIT
abiemarshall.com · GitHub @MarshallEvergreen
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_zapp-0.3.1.tar.gz.
File metadata
- Download URL: python_zapp-0.3.1.tar.gz
- Upload date:
- Size: 121.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b87a3cd1c18739986f7186ec6ad592d92157a0037275cc158e19886e073ac6d
|
|
| MD5 |
ea5f1ddb4b94bd8bb4afcad1fedad0b2
|
|
| BLAKE2b-256 |
09084244c33a92438dc41c93e6917d36e7032626365e6a4f2d1be62ad17325db
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1.tar.gz:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1.tar.gz -
Subject digest:
2b87a3cd1c18739986f7186ec6ad592d92157a0037275cc158e19886e073ac6d - Sigstore transparency entry: 193003163
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
731b3f1564b78eb2311479ee4e23a43c84893abc7aed75d4dd44d508635ab778
|
|
| MD5 |
a07d3180725979d4e6202391bff7424d
|
|
| BLAKE2b-256 |
4f247f3b9426a081c984ad348126a4dd43d28bee0f297aeaf11ae0cc0536ecef
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
731b3f1564b78eb2311479ee4e23a43c84893abc7aed75d4dd44d508635ab778 - Sigstore transparency entry: 193003167
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
970ea97d257681586ec3036025f62f64c1b002a07f69e8776563e909142e7597
|
|
| MD5 |
0c17b4ebbd5d53e9142d377ace153326
|
|
| BLAKE2b-256 |
436a91117c47c18e5b3c3c1e39f5c76a590ec656e54b44f60b3aad3c12325cb4
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-manylinux2014_s390x.manylinux_2_17_s390x.whl -
Subject digest:
970ea97d257681586ec3036025f62f64c1b002a07f69e8776563e909142e7597 - Sigstore transparency entry: 193003175
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f244576de475e99d41b9d5ed9988d1ab85d125e027d58b6c6b1c36f99cdedd9b
|
|
| MD5 |
b30cd1e75a919c52f47dddf32bac74fa
|
|
| BLAKE2b-256 |
bd37a358673760c9a5cb3a24c75acac2c8f767f615eb81a8666fe7baac663e27
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl -
Subject digest:
f244576de475e99d41b9d5ed9988d1ab85d125e027d58b6c6b1c36f99cdedd9b - Sigstore transparency entry: 193003165
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b11e32e9a6299ad191bf10dde838d3d13bd7590873febf5f4e1f4c5a7c1972
|
|
| MD5 |
4b362c7033e24aa6f0377562612f4c5d
|
|
| BLAKE2b-256 |
fc07f20090f04ad917aee74863d7363adc24875122ef82be5d883cea5c4eceec
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-manylinux2014_armv7l.manylinux_2_17_armv7l.whl -
Subject digest:
b5b11e32e9a6299ad191bf10dde838d3d13bd7590873febf5f4e1f4c5a7c1972 - Sigstore transparency entry: 193003170
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9f617c0f175b6d9af1d0753028687593897964bb551ce10ddea5ea4818bfe76
|
|
| MD5 |
94dd0ed1496f3e8b6f1038b7f7f05688
|
|
| BLAKE2b-256 |
f5ce5a7a37d747c3992ac3c1c1158fc3de78d4b00d50aa0aa350ecf10c3c20bc
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
f9f617c0f175b6d9af1d0753028687593897964bb551ce10ddea5ea4818bfe76 - Sigstore transparency entry: 193003171
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ed201ccd700139bc31e8703153138254de20899df2ed2b4dd378392e6998806
|
|
| MD5 |
28023402f3d5df053b376298acc98025
|
|
| BLAKE2b-256 |
c6367b7473944ac724d0b96ed126b4c6d66bf848ad74bf0a7568521e1aa873aa
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
6ed201ccd700139bc31e8703153138254de20899df2ed2b4dd378392e6998806 - Sigstore transparency entry: 193003168
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_zapp-0.3.1-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: python_zapp-0.3.1-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e71bc8ffe9cdfbd05ef49f82537fa1de890d9469661c9c2f69419cd76467d6e3
|
|
| MD5 |
4bc1265eeb1f6654490f0a4c75aeedae
|
|
| BLAKE2b-256 |
58a10dc86ca121a7764a03908a4212632887eddf7fdab08bd0df9b385ec41bcc
|
Provenance
The following attestation bundles were made for python_zapp-0.3.1-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on MarshallEvergreen/zapp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_zapp-0.3.1-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
e71bc8ffe9cdfbd05ef49f82537fa1de890d9469661c9c2f69419cd76467d6e3 - Sigstore transparency entry: 193003172
- Sigstore integration time:
-
Permalink:
MarshallEvergreen/zapp@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/MarshallEvergreen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@089e9fe6569b0d2dd9c72f6aee4ae08c8cc98974 -
Trigger Event:
release
-
Statement type: