# nucliadb
This module contains most of the Python components for NucliaDB:
- ingest
- reader
- writer
- search
- train
# NucliaDB Migrations
This module is used to manage NucliaDB Migrations.
All migrations will be provided in the `migrations` folder and have a filename
that follows the structure: `[sequence]_[migration name].py`.
Where `sequence` is the order the migration should be run in with zero padding.
Example: `0001_migrate_data.py`.
Each migration should have the following:
```python
from nucliadb.migrator.context import ExecutionContext
async def migrate(context: ExecutionContext) -> None:
"""
Non-kb type of migration. Migrate global data.
"""
async def migrate_kb(context: ExecutionContext, kbid: str) -> None:
"""
Migrate kb.
Must have both types of migrations.
"""
```
## How migrations are managed
- All migrations utilize a distributed lock to prevent simulateously running jobs
- Global migration state:
- current version
- target version
- KBs to migrate
- KB Migration State:
- current version
- Migrations are currently run with a deployment and will be continuously retried on failure.
- Running migrations in a deployment is to make sure a migration does not prevent code deployment.
Raw data
{
"_id": null,
"home_page": "https://docs.nuclia.dev/docs/management/nucliadb/intro",
"name": "nucliadb",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": "search, semantic, AI",
"author": "NucliaDB Community",
"author_email": "nucliadb@nuclia.com",
"download_url": null,
"platform": null,
"description": "# nucliadb\n\nThis module contains most of the Python components for NucliaDB:\n\n- ingest\n- reader\n- writer\n- search\n- train\n\n# NucliaDB Migrations\n\nThis module is used to manage NucliaDB Migrations.\n\nAll migrations will be provided in the `migrations` folder and have a filename\nthat follows the structure: `[sequence]_[migration name].py`.\nWhere `sequence` is the order the migration should be run in with zero padding.\nExample: `0001_migrate_data.py`.\n\nEach migration should have the following:\n\n```python\nfrom nucliadb.migrator.context import ExecutionContext\n\n\nasync def migrate(context: ExecutionContext) -> None:\n \"\"\"\n Non-kb type of migration. Migrate global data.\n \"\"\"\n\n\nasync def migrate_kb(context: ExecutionContext, kbid: str) -> None:\n \"\"\"\n Migrate kb.\n\n Must have both types of migrations.\n \"\"\"\n```\n\n\n## How migrations are managed\n\n- All migrations utilize a distributed lock to prevent simulateously running jobs\n- Global migration state:\n - current version\n - target version\n - KBs to migrate\n- KB Migration State:\n - current version\n\n- Migrations are currently run with a deployment and will be continuously retried on failure.\n- Running migrations in a deployment is to make sure a migration does not prevent code deployment.\n",
"bugtrack_url": null,
"license": "BSD",
"summary": null,
"version": "6.2.0.post2628",
"project_urls": {
"API Reference": "https://docs.nuclia.dev/docs/api",
"Github": "https://github.com/nuclia/nucliadb",
"Homepage": "https://docs.nuclia.dev/docs/management/nucliadb/intro",
"Nuclia": "https://nuclia.com",
"Slack": "https://nuclia-community.slack.com"
},
"split_keywords": [
"search",
" semantic",
" ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c6be97f850f98e2952b89a0df99da402f0a22b691e574378d47f91f34a295db1",
"md5": "e31ccf3a67aecb9efd69bd6c371456f8",
"sha256": "4e6b8c6067580f3f7375620d1dd620edce8d8d96575148a32d9bc89f40df481f"
},
"downloads": -1,
"filename": "nucliadb-6.2.0.post2628-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e31ccf3a67aecb9efd69bd6c371456f8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 604530,
"upload_time": "2024-12-18T16:39:58",
"upload_time_iso_8601": "2024-12-18T16:39:58.605786Z",
"url": "https://files.pythonhosted.org/packages/c6/be/97f850f98e2952b89a0df99da402f0a22b691e574378d47f91f34a295db1/nucliadb-6.2.0.post2628-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-18 16:39:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nuclia",
"github_project": "nucliadb",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "nucliadb"
}