Skip to main content

Pyinline

A function inliner for Python. Import inline from pyinline and run:

$ python -m pyinline source.py

This will convert the following:

from pyinline import inline
import logging

log = logging.getLogger(__name__)


@inline
def log_error(msg: str, exception: Exception):
    log.error(msg, exception, exc_info=True)


try:
    x = 1 / 0
except Exception as e:
    log_error("Could not divide number", e)

will generate:

import logging

log = logging.getLogger(__name__)


try:
    x = 1 / 0
except Exception as e:
    log.error("Could not divide number", e, exc_info=True)

Call with --diff to generate a patch.

Metadata

Release files for pyinline 0.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 pyinline 0.0.2
File Size Uploaded
pyinline-0.0.2.tar.gz 4.7 kB Details

Built distribution (wheel)

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

Total release size: 9.5 kB

Release files / pyinline-0.0.2.tar.gz

Download URL pyinline-0.0.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9099d53ba03f6375fd80e7f7107ae4b99b9b32bec5fbd43ebe517cd71d0568ce
BLAKE2b-256 checksum
How to use checksums
f4b20cf83fb2f113cda0d785fcc5b37b302a812a77303487faa1ce047c65233c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / pyinline-0.0.2-py3-none-any.whl

Download URL pyinline-0.0.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc2afa7602bdf97482535214b86c96df610bbd16df37839ebde672faa88e08eb
BLAKE2b-256 checksum
How to use checksums
d2c1b0fb2064f5a9dea1f94fe6ec33f71148bfd9f654f7467111822fb57e557c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release history Release notifications | RSS feed

This release

0.0.2 This release

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