Skip to main content

secmod

A simple module proxy for python. Avoids importing the module but gives an interface like ModuleType.

This useful when you want to examine the contents of the module without executing it. For example so safe the docstring or code in a database.

Install

pip install secmod

or install it from github

pip install git+https://github.com/cloasdata/secmod.git

or just clone it

usage

from pathlib import Path
from secmod import ModuleProxy

fp_module = Path("some_module.py")
module = ModuleProxy(fp_module)

print(module.__doc__)

Copyright © 2022 Simon Bauer

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for secmod 0.1.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 secmod 0.1.0
File Size Uploaded Provenance Actions
secmod-0.1.0.tar.gz 3.4 kB Without provenance Details for secmod-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for secmod 0.1.0
File Interpreter ABI Platform Actions
secmod-0.1.0-py3-none-any.whl Python 3 none any Details for secmod-0.1.0-py3-none-any.whl

Total release size: 7.3 kB

Release files / secmod-0.1.0.tar.gz

Download URL secmod-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bafc3d5117d7ce67b84d1ba4dbecf0dc8ebe1fe4f7bd471b947dd4c09a128242
BLAKE2b-256 checksum
How to use checksums
e4a4a5a2c095e43fbb1e52a9679f233e11bfc3b140301a4142487dd667224a28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

Release files / secmod-0.1.0-py3-none-any.whl

Download URL secmod-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08f6c2548c13260e70777844bce2ffd3112611f90492dad793b4eaf34de86238
BLAKE2b-256 checksum
How to use checksums
662fd479af6e3c6b69dd0ce18979125dadcd6e5b76d80060f38ec6650fb0c1c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

Security for secmod 0.1.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

0.1.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