nucliadb


Namenucliadb JSON
Version 3.0.3.post442 PyPI version JSON
download
home_pagehttps://docs.nuclia.dev/docs/guides/nucliadb/intro
SummaryNone
upload_time2024-04-19 14:44:06
maintainerNone
docs_urlNone
authorNucliaDB Community
requires_python<4,>=3.9
licenseBSD
keywords search semantic ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # 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/guides/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": "3.0.3.post442",
    "project_urls": {
        "API Reference": "https://docs.nuclia.dev/docs/api",
        "Discord": "https://discord.gg/8EvQwmsbzf",
        "Github": "https://github.com/nuclia/nucliadb",
        "Homepage": "https://docs.nuclia.dev/docs/guides/nucliadb/intro",
        "Nuclia": "https://nuclia.com"
    },
    "split_keywords": [
        "search",
        " semantic",
        " ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b0a42103fc7ef231a29ff09869e8f52f33ce98569b1f6587bc28c099f29bcab",
                "md5": "b38ed9a5fc68eeb391b3221804d69d35",
                "sha256": "79d030af8873e3dd673e0bf913dcf2c642d2a934de4978e8bc51add68271a6e7"
            },
            "downloads": -1,
            "filename": "nucliadb-3.0.3.post442-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b38ed9a5fc68eeb391b3221804d69d35",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.9",
            "size": 754997,
            "upload_time": "2024-04-19T14:44:06",
            "upload_time_iso_8601": "2024-04-19T14:44:06.415857Z",
            "url": "https://files.pythonhosted.org/packages/0b/0a/42103fc7ef231a29ff09869e8f52f33ce98569b1f6587bc28c099f29bcab/nucliadb-3.0.3.post442-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 14:44:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nuclia",
    "github_project": "nucliadb",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "nucliadb"
}
        
Elapsed time: 0.43028s