simple_module_sharing
A generic share table for
simple_module apps:
give one user view or edit access to one row of another module, with an
optional expiry, without that module shipping a bespoke share model. It plugs
into the framework's resource-scoped access (ResourcePolicy,
OwnedResourcePolicy, RequiresResource), so detail routes, lists and counts
all honour a share in SQL.
Install
pip install simple_module_sharing
Add simple_module_sharing to your host's dependencies; the
[project.entry-points.simple_module] entry point is discovered automatically
at boot. Run alembic upgrade heads to create sharing_resource_share.
Usage
Declare the resource type in the owning module and hand the policy a
share_exists factory:
from sharing.policy import share_exists_for
NOTE_POLICY = OwnedResourcePolicy(
Note.owner_id,
bypass_perm=PERM_NOTES_MANAGE,
share_exists=share_exists_for("notes.note", Note.id),
)
def register_resource_types(self, registry):
registry.register(
ResourceType(name="notes.note", policy=NOTE_POLICY, select_by_id=select_by_id(Note))
)
| Route | Purpose | Permission |
|---|---|---|
POST /api/sharing/shares |
Grant or update a share | sharing.share + policy can("share") |
GET /api/sharing/shares?resource_type=&resource_id= |
Shares on one row | sharing.share + policy can("share") |
DELETE /api/sharing/shares/{id} |
Revoke (hard delete) | sharing.share; granter, grantee or sharing.manage |
GET /admin/sharing/ |
Admin list of every share in the tenant | sharing.view |
Shares are tenant-scoped, expired shares never match, and grantees are
validated through the user directory. See docs/modules/sharing.md.
License
MIT
Metadata
Release files for simple-module-sharing 0.0.38
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simple_module_sharing-0.0.38.tar.gz | 16.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_module_sharing-0.0.38-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.6 kB
Release files / simple_module_sharing-0.0.38.tar.gz
| Download URL | simple_module_sharing-0.0.38.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0abbc0b4468f2c00f023bdbae0f62de68818683e7e65085b7f86315d75adfab9
|
|
BLAKE2b-256 checksum How to use checksums |
42b4a71dcaa2319f0de6995c9d043bafdf6ed551b7606ca8535e6f9516009324
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / simple_module_sharing-0.0.38-py3-none-any.whl
| Download URL | simple_module_sharing-0.0.38-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac03a762ad1a3f3297a896862a9a7a6e2bb018290939366fbda008841cd3d06a
|
|
BLAKE2b-256 checksum How to use checksums |
ad691bacec3ee37484ae5007c0e109d137f484ba645941915d9e29321ccf6988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for simple-module-sharing 0.0.38
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for simple_module_sharing-0.0.38.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA 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.