nucliadb


Namenucliadb JSON
Version 4.0.3.post603 PyPI version JSON
download
home_pagehttps://docs.nuclia.dev/docs/guides/nucliadb/intro
SummaryNone
upload_time2024-06-13 14:22:25
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": "4.0.3.post603",
    "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": "8a5dcd065241de22eb217519cc023a77c72e56084c716e043f037c4c8e5f009e",
                "md5": "2cddb5fddce094f25b90fb84c78d5ad8",
                "sha256": "3db95ac57913c4c61fdb3a97e572cf5a1879d7b5893350839af5e2d9abb2d6c6"
            },
            "downloads": -1,
            "filename": "nucliadb-4.0.3.post603-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2cddb5fddce094f25b90fb84c78d5ad8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.9",
            "size": 512880,
            "upload_time": "2024-06-13T14:22:25",
            "upload_time_iso_8601": "2024-06-13T14:22:25.515383Z",
            "url": "https://files.pythonhosted.org/packages/8a/5d/cd065241de22eb217519cc023a77c72e56084c716e043f037c4c8e5f009e/nucliadb-4.0.3.post603-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-13 14:22:25",
    "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.26150s