Skip to main content

Prelude_py

Tests Coverage Issues Stars

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.1.0.tar.gz (99.9 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.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prelude_py-0.1.0.tar.gz
  • Upload date:
  • Size: 99.9 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.1.0.tar.gz
Algorithm Hash digest
SHA256 415a1c78ec4006e22dcbf93c181c0d1c83c0267a28bdab07ed858da84e58d738
MD5 a1807c46cdf006ad044b9501bcb73ea9
BLAKE2b-256 5a0e6c3da66b3093ab66a031159ff5341c67e5d14b1ed0fd36b18791692df4e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for prelude_py-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: prelude_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91cce972c90a88a09e2edd29051b8d2fbb342af4d1e53e7be26a825a059c8207
MD5 541a5c60f593c6669353f92dc2aeaa8d
BLAKE2b-256 32e39366e76faa53ca770d14a6136509c454f763cacf5aa873bc9b7ce56b2a52

See more details on using hashes here.

Provenance

The following attestation bundles were made for prelude_py-0.1.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

0.2.0

2 files

This release

0.1.0 This release

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