Skip to main content

Impexpr

A simple superset of Python with import expressions added in. Beware: This project has only been made as a proof of concept and is not intended to ever be used in production.

Installation

pip install impexpr

Quickstart

impexpr alias can be used in the same way as python alias, a few examples:

  • To run an interactive REPL with import expression support, run impexpr
  • To run a script, run impexpr script.py (all imported modules will also support import expressions)
  • To import itertools and use it in the same line:
for x in (import itertools).chain([1, 2], [3, 4], [5, 6]):
    print(x)
  • To get help about collections.deque:
help((import collections).deque)
  • If your script must run with python alias but you want to enable import expression support in all imported modules (not in the main script!), you can use:
import impexpr
impexpr.add_hook()
# this will now support import expressions
import my_other_script
  • For everything else, run impexpr --help

FAQ

  • Relative imports not supported yet

Release files for impexpr 0.0.5

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

Source distribution (sdist)

Source distribution for impexpr 0.0.5
File Size Uploaded
impexpr-0.0.5.tar.gz 3.7 kB Details

Built distribution (wheel)

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

Total release size: 7.6 kB

Release files / impexpr-0.0.5.tar.gz

Download URL impexpr-0.0.5.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d3d615be56659c803111b6323ab84f18c970c6481083debab1f14cc1659f92da
BLAKE2b-256 checksum
How to use checksums
2338d457a69449c6c920e0536ae240235117ed265f75babd70e8605ac375d0cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Linux/5.15.38-1-MANJARO

Release files / impexpr-0.0.5-py3-none-any.whl

Download URL impexpr-0.0.5-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7955026450c662dadc57df5ebc6c9d5c60af92b9bc0830d5ecbb1fe1ef57479a
BLAKE2b-256 checksum
How to use checksums
c4174ee0f412f59becde86b939c55c44a10e7c88e1a73d97b5024ba49b07108c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.4 Linux/5.15.38-1-MANJARO

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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