Skip to main content

The Nuvolos Python library for database connectivity

Project description

nuvolos - The database connectivity library for Nuvolos

Installation

$ pip install --upgrade nuvolos

Connecting to Snowflake with Nuvolos Connector

1. Using SQLAlchemy with Username/Password

from nuvolos import get_connection
from sqlalchemy import text

# Connect using username and password
conn = get_connection(
    username="your_username",
    password="your_password",
    dbname="YOUR_DB",
    schemaname="YOUR_SCHEMA"
)

try:
    # Execute a query
    result = conn.execute(text("SELECT * FROM YOUR_TABLE"))
    for row in result:
        print(row)
finally:
    conn.close()

2. Using SQLAlchemy with RSA Key

import os
from nuvolos import get_connection
from sqlalchemy import text

# Set environment variables for RSA authentication
os.environ["SNOWFLAKE_RSA_KEY"] = "/path/to/rsa_key.p8"
os.environ["SNOWFLAKE_RSA_KEY_PASSPHRASE"] = "your_key_passphrase"  # Optional

# Connect using RSA key authentication
conn = get_connection(
    username="YOUR_USERNAME",
    dbname="YOUR_DB",
    schemaname="YOUR_SCHEMA"
)

try:
    # Execute a query
    result = conn.execute(text("SELECT * FROM YOUR_TABLE"))
    for row in result:
        print(row)
finally:
    conn.close()

3. Using Raw Connector with Username/Password

from nuvolos import get_raw_connection

# Connect using username and password
conn = get_raw_connection(
    username="your_username",
    password="your_password",
    dbname="YOUR_DB",
    schemaname="YOUR_SCHEMA"
)

4. Using Raw Connector with RSA Key

import os
from nuvolos import get_raw_connection

# Set environment variables for RSA authentication
os.environ["SNOWFLAKE_RSA_KEY"] = "/path/to/rsa_key.p8"
os.environ["SNOWFLAKE_RSA_KEY_PASSPHRASE"] = "your_key_passphrase"  # Optional

# Connect using RSA key authentication
conn = get_raw_connection(
    username="YOUR_USERNAME",
    dbname="YOUR_DB",
    schemaname="YOUR_SCHEMA"
)

Documentation and examples available at: https://docs.nuvolos.cloud/data/access-data-from-applications#connecting-with-python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nuvolos-0.6.5.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

nuvolos-0.6.5-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file nuvolos-0.6.5.tar.gz.

File metadata

  • Download URL: nuvolos-0.6.5.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nuvolos-0.6.5.tar.gz
Algorithm Hash digest
SHA256 ffac1b43c872bb916fdfca2ed9f4240f3d1524f24c76db9ab9bfd67464a43fab
MD5 87c584363da33e342024606c822299b7
BLAKE2b-256 69bf9479602045ef1ecbff36bc4a2c8b5500261b0fab303bdfed02c5b28d4b92

See more details on using hashes here.

File details

Details for the file nuvolos-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: nuvolos-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nuvolos-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e497be7965e83df920c436094df7e8dcd23c81de0dbc2372c3bd2a7ffcb853a8
MD5 0b5f8569ddbb4ebea8ee537d4c249c5c
BLAKE2b-256 f4e290e9f3c0f489abac4a66c4e4f5d27f6ff4d63633541600ad1215ea00119e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page