{"id":27901,"library":"lamindb","title":"LaminDB","description":"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.","status":"active","version":"2.4.2","language":"python","source_language":"en","source_url":"https://github.com/laminlabs/lamindb","tags":["data management","biology","ORM","LaminDB"],"install":[{"cmd":"pip install lamindb","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Core ORM and data models for LaminDB.","package":"lamin_lamindb","optional":false},{"reason":"Setup and configuration (instance, user, storage).","package":"lamindb_setup","optional":false},{"reason":"Biological entity definitions (genes, proteins, cell types).","package":"bionty","optional":true},{"reason":"Logging utility used by LaminDB.","package":"lamin_logger","optional":true}],"imports":[{"note":"`ln` is not a top-level name; it's an alias used after importing the package.","wrong":"from lamindb import ln","symbol":"ln","correct":"import lamindb as ln"},{"note":"Classes like Artifact, Experiment, etc. live under the `ln` namespace after import.","wrong":"from lamindb import Artifact","symbol":"ln.Artifact","correct":"import lamindb as ln; artifact = ln.Artifact(...)"},{"note":"Setup functions are accessed via `ln.setup`, not as top-level imports.","wrong":"from lamindb.setup import init","symbol":"ln.setup","correct":"import lamindb as ln; ln.setup.init(...)"}],"quickstart":{"code":"import os\nos.environ['LAMIN_INSTANCE_ID'] = 'testinstance'\nimport lamindb as ln\n\n# Initialize a local test instance (no authentication required)\nln.setup.init(storage='./test_lamin')\n\n# Create a simple artifact\nartifact = ln.Artifact.from_file('README.md', description='Test artifact')\nartifact.save()\nprint('Artifact saved:', artifact.id)","lang":"python","description":"Initialize a LaminDB instance locally (bypasses LaminHub auth) and create an Artifact. Ensure LAMIN_INSTANCE_ID env var is set for testing."},"warnings":[{"fix":"Use `lamin migrate` CLI tool to upgrade existing databases; rewrite code using v2 API.","message":"Migration 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.","severity":"breaking","affected_versions":">=1.0,<2.0"},{"fix":"Use `pip install lamindb` and add optional packages individually.","message":"Do 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]`).","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Call `ln.setup.init(storage='./local_path', schema='small')` for a local test instance.","message":"Importing `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).","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Use `ln.Artifact.from_memory(data, key='...')`.","message":"`from lamindb import InMemoryArtifact` and other in-memory only classes are deprecated in 2.4. Use `ln.Artifact` with `memfile=True` parameter instead.","severity":"deprecated","affected_versions":"2.4.x"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install lamindb` in the correct environment (Python 3.10-3.14).","cause":"Package not installed or Python environment path issue.","error":"ModuleNotFoundError: No module named 'lamindb'"},{"fix":"Set `LAMIN_INSTANCE_ID` env var or call `ln.setup.init(storage='./mydata')`.","cause":"No instance is configured; environment variables missing.","error":"lamindb.core.exceptions.SetupError: No LaminDB instance configured. Please call ln.setup.init() or set LAMIN_INSTANCE_ID."},{"fix":"Use `import lamindb as ln` then `ln.Artifact`. Update with `pip install --upgrade lamindb`.","cause":"Wrong import style or out-of-date version.","error":"AttributeError: module 'lamindb' has no attribute 'Artifact'"},{"fix":"Remove `version` from the call; use `ln.Artifact.from_file(path, description='...')`.","cause":"The `version` parameter was removed in v2.3.0.","error":"TypeError: Artifact.from_file() got an unexpected keyword argument 'version'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}