nendo_plugin_library_postgres


Namenendo_plugin_library_postgres JSON
Version 0.1.5 PyPI version JSON
download
home_pagehttps://okio.ai
SummaryPostgresDB implementation of the Nendo Library plugin. Comes with support for track embeddings.
upload_time2024-03-04 11:52:44
maintainer
docs_urlNone
authorOkio Team
requires_python>=3.8,<3.11
licenseMIT
keywords nendo ai machine learning audio generative library plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Nendo PostgresDB Library Plugin

<br>
<p align="left">
    <img src="https://okio.ai/docs/assets/nendo_core_logo.png" width="350" alt="Nendo Core">
</p>
<br>

<p align="left">
<a href="https://okio.ai" target="_blank">
    <img src="https://img.shields.io/website/https/okio.ai" alt="Website">
</a>
<a href="https://twitter.com/okio_ai" target="_blank">
    <img src="https://img.shields.io/twitter/url/https/twitter.com/okio_ai.svg?style=social&label=Follow%20%40okio_ai" alt="Twitter">
</a>
<a href="https://discord.gg/gaZMZKzScj" target="_blank">
    <img src="https://dcbadge.vercel.app/api/server/XpkUsjwXTp?compact=true&style=flat" alt="Discord">
</a>
</p>

---

PostgresDB implementation of the Nendo Library Plugin.

## Features


- Supports use of a local or remote PostgresDB instance for storing Nendo's library data.
- Comes with the Nendo Library vector extension, providing support for the storing, querying and retrieval of Embeddings related to Nendo tracks.
- Provides functions for performing a neighborhood search of similar NendoTracks based on various distance metrics.
- Provides a set of special filtering functions for more fine-grained search and retrieval of items from the Nendo Library.

## Requirements

### PostgreSQL

Using this plugin requires you to install the postgres client libraries on the local system. Depending on your OS, you can either install just the client libraries or the entire Postgres package, depending on whether you intend to connect to a remote or a local instance of PostgresDB:

- **Ubuntu**:
    - `sudo apt-get install libpq-dev` (client libraries)
    - `sudo apt-get install postgresql` (complete postgresDB)
- **Mac OS**:
    - `brew install libpq` (client libraries)
    - `brew install postgresql@14` (complete postgresDB)

### pgvector extension

Furthermore, the plugin requires the `pgvector` extension to be installed. Please follow it's official [installation instructions](https://github.com/pgvector/pgvector#installation) to install it before proceeding further.

After you've installed the `pgvector` package, you must also enable the extension for the `nendo` database. Connect to your PostgreSQL instance **with an account that has superuser priviledges** and execute:

```sql
USE nendo;
CREATE EXTENSION IF NOT EXISTS vector;
```

### Embedding plugin

To use the vector features of the Nendo Library, you also need to have at least one `NendoEmbeddingPlugin` installed in your environment and configured to be used by Nendo. For example, to use the `nendo_plugin_embed_clap`, [install it](https://github.com/okio-ai/nendo/nendo_plugin_embed_clap#requirements) and then configure Nendo to also load it on startup. You can use an environment variable for this:

```bash
export PLUGINS='["nendo_plugin_embed_clap"]'
```

The PostgresDB Nendo Library plugin will then pick up the embedding plugin automatically.

## Installation

1. Make sure to meet the [requirements](#requirements).
1. `pip install nendo-plugin-library-postgres`

## How to use

To enable the postgres library plugin, Nendo must be started with the `library_plugin` configuration variable set to `nendo_plugin_library_postgres`:

```python
from nendo import Nendo,NendoConfig
nd = Nendo(config=NendoConfig(library_plugin="nendo_plugin_library_postgres",plugins=["nendo_plugin_embed_clap"]))
```

Alternatively, you can use environment variables to configure Nendo and enable the postgres library plugin. Refer to the [configuration](#plugin-configuration) section for more information.

### Plugin configuration

Please use environment variables to configure the plugin:

```bash
export LIBRARY_PLUGIN="nendo_plugin_library_postgres"
export PLUGINS='["nendo_plugin_embed_clap"]'
export POSTGRES_HOST="localhost:5432"
export POSTGRES_USER="nendo"
export POSTGRES_PASSWORD="nendo"
export POSTGRES_DB="nendo"
```

Then, the configuration will be applied once you start Nendo:

```python
from nendo import Nendo

nd = Nendo()

# print library info
print(nd.library)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://okio.ai",
    "name": "nendo_plugin_library_postgres",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.11",
    "maintainer_email": "",
    "keywords": "nendo,AI,Machine Learning,Audio,Generative,Library,Plugin",
    "author": "Okio Team",
    "author_email": "team@okio.ai",
    "download_url": "https://files.pythonhosted.org/packages/24/ff/294faf300ddaa8b90b4782682877d0f7ca5acb0b7c58fbf29caf1fb5305a/nendo_plugin_library_postgres-0.1.5.tar.gz",
    "platform": null,
    "description": "# Nendo PostgresDB Library Plugin\n\n<br>\n<p align=\"left\">\n    <img src=\"https://okio.ai/docs/assets/nendo_core_logo.png\" width=\"350\" alt=\"Nendo Core\">\n</p>\n<br>\n\n<p align=\"left\">\n<a href=\"https://okio.ai\" target=\"_blank\">\n    <img src=\"https://img.shields.io/website/https/okio.ai\" alt=\"Website\">\n</a>\n<a href=\"https://twitter.com/okio_ai\" target=\"_blank\">\n    <img src=\"https://img.shields.io/twitter/url/https/twitter.com/okio_ai.svg?style=social&label=Follow%20%40okio_ai\" alt=\"Twitter\">\n</a>\n<a href=\"https://discord.gg/gaZMZKzScj\" target=\"_blank\">\n    <img src=\"https://dcbadge.vercel.app/api/server/XpkUsjwXTp?compact=true&style=flat\" alt=\"Discord\">\n</a>\n</p>\n\n---\n\nPostgresDB implementation of the Nendo Library Plugin.\n\n## Features\n\n\n- Supports use of a local or remote PostgresDB instance for storing Nendo's library data.\n- Comes with the Nendo Library vector extension, providing support for the storing, querying and retrieval of Embeddings related to Nendo tracks.\n- Provides functions for performing a neighborhood search of similar NendoTracks based on various distance metrics.\n- Provides a set of special filtering functions for more fine-grained search and retrieval of items from the Nendo Library.\n\n## Requirements\n\n### PostgreSQL\n\nUsing this plugin requires you to install the postgres client libraries on the local system. Depending on your OS, you can either install just the client libraries or the entire Postgres package, depending on whether you intend to connect to a remote or a local instance of PostgresDB:\n\n- **Ubuntu**:\n    - `sudo apt-get install libpq-dev` (client libraries)\n    - `sudo apt-get install postgresql` (complete postgresDB)\n- **Mac OS**:\n    - `brew install libpq` (client libraries)\n    - `brew install postgresql@14` (complete postgresDB)\n\n### pgvector extension\n\nFurthermore, the plugin requires the `pgvector` extension to be installed. Please follow it's official [installation instructions](https://github.com/pgvector/pgvector#installation) to install it before proceeding further.\n\nAfter you've installed the `pgvector` package, you must also enable the extension for the `nendo` database. Connect to your PostgreSQL instance **with an account that has superuser priviledges** and execute:\n\n```sql\nUSE nendo;\nCREATE EXTENSION IF NOT EXISTS vector;\n```\n\n### Embedding plugin\n\nTo use the vector features of the Nendo Library, you also need to have at least one `NendoEmbeddingPlugin` installed in your environment and configured to be used by Nendo. For example, to use the `nendo_plugin_embed_clap`, [install it](https://github.com/okio-ai/nendo/nendo_plugin_embed_clap#requirements) and then configure Nendo to also load it on startup. You can use an environment variable for this:\n\n```bash\nexport PLUGINS='[\"nendo_plugin_embed_clap\"]'\n```\n\nThe PostgresDB Nendo Library plugin will then pick up the embedding plugin automatically.\n\n## Installation\n\n1. Make sure to meet the [requirements](#requirements).\n1. `pip install nendo-plugin-library-postgres`\n\n## How to use\n\nTo enable the postgres library plugin, Nendo must be started with the `library_plugin` configuration variable set to `nendo_plugin_library_postgres`:\n\n```python\nfrom nendo import Nendo,NendoConfig\nnd = Nendo(config=NendoConfig(library_plugin=\"nendo_plugin_library_postgres\",plugins=[\"nendo_plugin_embed_clap\"]))\n```\n\nAlternatively, you can use environment variables to configure Nendo and enable the postgres library plugin. Refer to the [configuration](#plugin-configuration) section for more information.\n\n### Plugin configuration\n\nPlease use environment variables to configure the plugin:\n\n```bash\nexport LIBRARY_PLUGIN=\"nendo_plugin_library_postgres\"\nexport PLUGINS='[\"nendo_plugin_embed_clap\"]'\nexport POSTGRES_HOST=\"localhost:5432\"\nexport POSTGRES_USER=\"nendo\"\nexport POSTGRES_PASSWORD=\"nendo\"\nexport POSTGRES_DB=\"nendo\"\n```\n\nThen, the configuration will be applied once you start Nendo:\n\n```python\nfrom nendo import Nendo\n\nnd = Nendo()\n\n# print library info\nprint(nd.library)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "PostgresDB implementation of the Nendo Library plugin. Comes with support for track embeddings.",
    "version": "0.1.5",
    "project_urls": {
        "Homepage": "https://okio.ai",
        "Repository": "https://github.com/okio-ai/nendo_plugin_library_postgres"
    },
    "split_keywords": [
        "nendo",
        "ai",
        "machine learning",
        "audio",
        "generative",
        "library",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8dd7111030314da5856d1bafebbcd6a09c5f733e4e17e0a130a451af0f92cb2",
                "md5": "6b677f3ce95ce3371935f7e7a07d186f",
                "sha256": "ea6d9d14523583c8917af9243d4b4e3947529b0f8792408c125a5cab7b440340"
            },
            "downloads": -1,
            "filename": "nendo_plugin_library_postgres-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b677f3ce95ce3371935f7e7a07d186f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.11",
            "size": 13471,
            "upload_time": "2024-03-04T11:52:42",
            "upload_time_iso_8601": "2024-03-04T11:52:42.930112Z",
            "url": "https://files.pythonhosted.org/packages/b8/dd/7111030314da5856d1bafebbcd6a09c5f733e4e17e0a130a451af0f92cb2/nendo_plugin_library_postgres-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "24ff294faf300ddaa8b90b4782682877d0f7ca5acb0b7c58fbf29caf1fb5305a",
                "md5": "e31bd2349d801d80a2f8f24a77cb3079",
                "sha256": "fd2006eef16bed4538ab45409148126421dc2e1c52e1e69741982a4b24c2a7d1"
            },
            "downloads": -1,
            "filename": "nendo_plugin_library_postgres-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "e31bd2349d801d80a2f8f24a77cb3079",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.11",
            "size": 14510,
            "upload_time": "2024-03-04T11:52:44",
            "upload_time_iso_8601": "2024-03-04T11:52:44.809474Z",
            "url": "https://files.pythonhosted.org/packages/24/ff/294faf300ddaa8b90b4782682877d0f7ca5acb0b7c58fbf29caf1fb5305a/nendo_plugin_library_postgres-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-04 11:52:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "okio-ai",
    "github_project": "nendo_plugin_library_postgres",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nendo_plugin_library_postgres"
}
        
Elapsed time: 1.47395s