Registry / database / lamindb

lamindb

JSON →
library2.4.2pypypi✓ verified 84d ago

A full/meta-package for the LaminDB data management ecosystem, unifying modules like `lamin_lamindb`, `lamindb_setup`, and `bionty` into a single import. Current stable version 2.4.2 requires Python 3.10–3.14. The library is actively maintained with monthly releases.

pip install lamindb
INSTALL
IMPORT
SIG · LAMINDB
L
lamindb
databasepythonv2.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ln
import lamindb as ln
from lamindb import ln
`ln` is not a top-level name; it's an alias used after importing the package.
ln.Artifact
import lamindb as ln; artifact = ln.Artifact(...)
from lamindb import Artifact
Classes like Artifact, Experiment, etc. live under the `ln` namespace after import.
ln.setup
import lamindb as ln; ln.setup.init(...)
from lamindb.setup import init
Setup functions are accessed via `ln.setup`, not as top-level imports.

Initialize a LaminDB instance locally (bypasses LaminHub auth) and create an Artifact. Ensure LAMIN_INSTANCE_ID env var is set for testing.

import os os.environ['LAMIN_INSTANCE_ID'] = 'testinstance' import lamindb as ln # Initialize a local test instance (no authentication required) ln.setup.init(storage='./test_lamin') # Create a simple artifact artifact = ln.Artifact.from_file('README.md', description='Test artifact') artifact.save() print('Artifact saved:', artifact.id)
lamin --version
Debug
Known issues
breakingMigration from v1 to v2: The entire data model changed. `File` became `Artifact`, `Storage` became `Collection`, and `Project`/`Experiment` relations were restructured. Old scripts using v1 classes and queries will not work.
fix
Use `lamin migrate` CLI tool to upgrade existing databases; rewrite code using v2 API.
affects: >=1.0,<2.0
gotchaDo not use `pip install lamindb[all]` for production: it installs optional dependencies (bionty, scanpy, etc.) that may conflict with existing environments. Only install extras you need (e.g., `pip install lamindb[bionty]`).
fix
Use `pip install lamindb` and add optional packages individually.
affects: >=2.0
gotchaImporting `lamindb` without first setting up a valid instance or environment will raise `ModuleNotFoundError` or `SetupError`. The env vars `LAMIN_INSTANCE_ID` or `LAMIN_ENVIRONMENT` must be configured (or call `ln.setup.init()` first).
fix
Call `ln.setup.init(storage='./local_path', schema='small')` for a local test instance.
affects: >=2.0
deprecated`from lamindb import InMemoryArtifact` and other in-memory only classes are deprecated in 2.4. Use `ln.Artifact` with `memfile=True` parameter instead.
fix
Use `ln.Artifact.from_memory(data, key='...')`.
affects: 2.4.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lamindb'
Package not installed or Python environment path issue.
fix
Run `pip install lamindb` in the correct environment (Python 3.10-3.14).
lamindb.core.exceptions.SetupError: No LaminDB instance configured. Please call ln.setup.init() or set LAMIN_INSTANCE_ID.
No instance is configured; environment variables missing.
fix
Set `LAMIN_INSTANCE_ID` env var or call `ln.setup.init(storage='./mydata')`.
AttributeError: module 'lamindb' has no attribute 'Artifact'
Wrong import style or out-of-date version.
fix
Use `import lamindb as ln` then `ln.Artifact`. Update with `pip install --upgrade lamindb`.
TypeError: Artifact.from_file() got an unexpected keyword argument 'version'
The `version` parameter was removed in v2.3.0.
fix
Remove `version` from the call; use `ln.Artifact.from_file(path, description='...')`.
Upgrade
Version history
2.4.2latest on PyPI · released Apr 27, 2026
Audit
Dependencies
lamin_lamindbrequiredCore ORM and data models for LaminDB.
lamindb_setuprequiredSetup and configuration (instance, user, storage).
biontyoptionalBiological entity definitions (genes, proteins, cell types).
lamin_loggeroptionalLogging utility used by LaminDB.
Agent activity
27 hits · last 30 days
node
26
OpenAI (training)
1
Resources
lamindb — pip install lamindb · libregistry