Nendo PostgresDB Library Plugin
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 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:
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 and then configure Nendo to also load it on startup. You can use an environment variable for this:
export PLUGINS='["nendo_plugin_embed_clap"]'
The PostgresDB Nendo Library plugin will then pick up the embedding plugin automatically.
Installation
- Make sure to meet the requirements.
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:
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 section for more information.
Plugin configuration
Please use environment variables to configure the plugin:
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:
from nendo import Nendo
nd = Nendo()
# print library info
print(nd.library)
Metadata
Release files for nendo_plugin_library_postgres 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nendo_plugin_library_postgres-0.1.5.tar.gz | 14.5 kB | Without provenance | Details for nendo_plugin_library_postgres-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nendo_plugin_library_postgres-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for nendo_plugin_library_postgres-0.1.5-py3-none-any.whl |
Total release size: 28.0 kB
Release files / nendo_plugin_library_postgres-0.1.5.tar.gz
| Download URL | nendo_plugin_library_postgres-0.1.5.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd2006eef16bed4538ab45409148126421dc2e1c52e1e69741982a4b24c2a7d1
|
|
BLAKE2b-256 checksum How to use checksums |
24ff294faf300ddaa8b90b4782682877d0f7ca5acb0b7c58fbf29caf1fb5305a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.9.16 Linux/6.6.11_1
|
Release files / nendo_plugin_library_postgres-0.1.5-py3-none-any.whl
| Download URL | nendo_plugin_library_postgres-0.1.5-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea6d9d14523583c8917af9243d4b4e3947529b0f8792408c125a5cab7b440340
|
|
BLAKE2b-256 checksum How to use checksums |
b8dd7111030314da5856d1bafebbcd6a09c5f733e4e17e0a130a451af0f92cb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.9.16 Linux/6.6.11_1
|
Security for nendo_plugin_library_postgres 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.