Skip to main content

bareimport - Import a python file even if it does not end in ".py".

This module is useful for building tests of functions within standalone scripts. This allows you to have a standalone script file, without having to name it ending in ".py". Then you can create test files that:

import bareimport
mod = bareimport.import_script_as_module('mod', ['./mod', '../mod'])

#  You can also import "mod" now:
from mod import func

License

CC0 1.0 Universal, see LICENSE file for more information.

Metadata

Release files for bareimport 0.1

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

Source distribution (sdist)

Source distribution for bareimport 0.1
File Size Uploaded
bareimport-0.1.tar.gz 5.7 kB Details

Built distribution (wheel)

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

Total release size: 11.2 kB

Release files / bareimport-0.1.tar.gz

Download URL bareimport-0.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f80a3cc82b56f124f574bc120baf7e31f2f76b414c8df83206b4bee10339837e
BLAKE2b-256 checksum
How to use checksums
14ce69a4fe4ae0034ef0279e5ffbb39714c118d517fc30fb4d32d5e409d58e50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / bareimport-0.1-py3-none-any.whl

Download URL bareimport-0.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a53990fdf20c538d751031f9a5742abb04cbfb07c661ac474181f1c2995d6ef8
BLAKE2b-256 checksum
How to use checksums
e62efc8c6503cb972146681837962d8dc3853427bf2de759be8cd1a2ba4f3f4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

0.2

2 release files

This release

0.1 This release

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