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.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 bareimport 0.2
File Size Uploaded
bareimport-0.2.tar.gz 5.7 kB Details

Built distribution (wheel)

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

Total release size: 11.2 kB

Release files / bareimport-0.2.tar.gz

Download URL bareimport-0.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
346f0bdf5838c16958285a78ff3c02f928b25c28bc5a3373177e821854629b6d
BLAKE2b-256 checksum
How to use checksums
844ac0f5e1fc6eac113515a1624ea0d75084b1409410605b5bfd6f35f57e2617
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

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

Download URL bareimport-0.2-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86df488c985a602d37dc9b472d07d5d1b26fa9429024330946bef5d12d8de8c7
BLAKE2b-256 checksum
How to use checksums
4551724508a960741c7ea2b7702d188a43fa92102b1e6d0af28f67e39b1bbfe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

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