Skip to main content

Documentation Status Open Issues PyPI Package Test Health Code Coverage

When you just need that code, include does the ugly bits for you. It allows you to run code from files, strings or other sources as if they were regular modules. Code is executed as compliant as possible with the Python ecosystem. The resulting modules and objects can be pickled, copied and sent to other processes. This makes include suitable for testing, configuration, code creation and more.

Usage

include provides a simple API that works similar to the __import__ builtin. To import a module from its file path, pass it to the include.path function:

import include
conf_module = include.path('/etc/myapp/conf.py')

Once a module has been imported by include, it does not require special handling. You can work with the resulting module and its content without using include explicitly.

note:

The include package must be importable by any python process working with a module imported by include.

Installation

The most recent stable version of include is available from pypi. You can install it using pip:

pip install include

Metadata

Release files for include 0.2.2

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

Source distribution (sdist)

Source distribution for include 0.2.2
File Size Uploaded
include-0.2.2.tar.gz 9.9 kB Details

Built distribution (wheel)

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

Total release size: 24.1 kB

Release files / include-0.2.2.tar.gz

Download URL include-0.2.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
37c2c6854f145bce050e75847c8da17039bdfae76d2c7e95bf531eaad2148e69
BLAKE2b-256 checksum
How to use checksums
44c6a263ccff96cb6c6e4b15c03108f5d8d99f44e0941096d1275bd4adca050a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / include-0.2.2-py2.py3-none-any.whl

Download URL include-0.2.2-py2.py3-none-any.whl
Size 14.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
58c7d81ba82b92ed432919aaa019bdde7258c569bfd85f1ea44a525576b20529
BLAKE2b-256 checksum
How to use checksums
0f2c69552fa13f4a1af5a58f5f2a964bfdefdf6614a0d21b141fd9ed24c2776e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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