Skip to main content

Prelude_py

Tests Coverage Issues Stars PyPI PyPI Downloads

prelude_py is a lightweight convenience module that provides lazy imports for commonly used scientific Python libraries through familiar aliases. Instead of importing each library individually, you can access them from a single namespace.

Modules are imported only when first accessed, so importing prelude_py itself has virtually no overhead.

Installation

Install the package:

uv pip install prelude_py

To install all supported optional dependencies:

uv pip install "prelude_py[all]"

Usage

from prelude_py import np, pd, sns, plt

# NumPy
x = np.linspace(0, 10, 100)
y = np.sin(x)

# Pandas
df = pd.DataFrame({"x": x, "sin(x)": y})

# Seaborn
sns.set_theme(style="whitegrid")
sns.lineplot(data=df, x="x", y="sin(x)")
plt.title("Sine Wave")
plt.tight_layout()
plt.show()

Output:

from prelude_py import do

# Load example AnnData
adata = do.dt.example_10x_processed()

# Plot UMAP colored by cell annotation
do.pl.umap(adata, color="annotation")

Output:

Matplotlib example plot

Available aliases

Alias Package
np numpy
nb numba
pd pandas
pl polars
mpl matplotlib
plt matplotlib.pyplot
sns seaborn
do dotools_py
ad anndata
sc scanpy
dc decoupler
sq squidpy
pt pertpy
scvi scvi

License

This project is distributed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prelude_py-0.2.0.tar.gz (100.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prelude_py-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file prelude_py-0.2.0.tar.gz.

File metadata

  • Download URL: prelude_py-0.2.0.tar.gz
  • Upload date:
  • Size: 100.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prelude_py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 53241c492fbe76e954c2c38fd975928bbd5f86d945828b98f4adee2e864e8d6d
MD5 6e7edec4c70152ca3b33db367ec7c798
BLAKE2b-256 d6a49d82060664946a8e78a8f13efa0717be51f3f8f96f1b75b2e10e8dc4ad27

See more details on using hashes here.

Provenance

The following attestation bundles were made for prelude_py-0.2.0.tar.gz:

Publisher: release.yaml on davidrm-bio/prelude_py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prelude_py-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: prelude_py-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prelude_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5fdaab1b0dcdecbcfc50a9424b0b4b0271896566b94da54f6845a53e5a87ca1
MD5 da02407ee61050aa823440e779212d34
BLAKE2b-256 44c2e5f7d8f9762380769f40ec5522c5de556ef4de75e08a344608da7e940d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for prelude_py-0.2.0-py3-none-any.whl:

Publisher: release.yaml on davidrm-bio/prelude_py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 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