Skip to main content

import_string

https://img.shields.io/pypi/v/import_string.svg https://img.shields.io/travis/rochacbruno/import_string.svg Documentation Status Updates

Imports an object based on a string

Features

Imports an object based on a string. This is useful if you want to use import paths as endpoints or something similar. An import path can be specified either in dotted notation (.) or with a colon as object delimiter (:). If silent is True the return value will be None if the import fails.

Usage

import import_string

module = import_string('my_system.my_package.my_module')

function = import_string('my_system.my_module:some_function')

Class = import_string('my_system.my_module:SomeClass', silent=True)
# If path doesn't exist Class = None

Credits

History

0.1.0 (2016-06-30)

  • First release on PyPI.

Metadata

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

Built distribution (wheel)

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

Total release size: 27.8 kB

Release files / import_string-0.1.0.tar.gz

Download URL import_string-0.1.0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
67528219c433ee6037944e52482989770333b4b02f380a44c5560c09f8bc3a61
BLAKE2b-256 checksum
How to use checksums
37a696d706f61fb06b85d2ba2292ff1f18c9cf3f8eefaf68dbed219c9eb07c3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / import_string-0.1.0-py2.py3-none-any.whl

Download URL import_string-0.1.0-py2.py3-none-any.whl
Size 5.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5fc47d00bd324e7ea8da97248b57799c59da5d097085178073030b839897d5e5
BLAKE2b-256 checksum
How to use checksums
0e69cf9315d0905ab9146212c9a3ab1ae9ae25f893606397e2533f6adee8232f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for import_string 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