Skip to main content

nova-pg

Python PostgreSQL PyPI Dev Containers Docker

nova-pg is a Python package designed to simplify and streamline interactions with PostgreSQL databases.
It provides a set of helper functions that make it easier to connect, query, and manage data in a scalable and reusable way.

The main goal of this project is to accelerate development, enable scalability, and offer a portable package that can be easily integrated wherever database access is required.


📦 Installation (PyPI Package)

You can install Nova PG directly from PyPI using pip:

pip install nova-pg

Or, if you want to test the latest version from TestPyPI, use:

pip install -i https://test.pypi.org/simple --extra-index-url https://pypi.org/simple nova-pg

🧩 Repository Structure

This repository includes:

  • Example configuration files for environment setup.
  • A dedicated test folder to validate the functionality of the helper functions.
  • A Docker-based development environment for consistent and isolated builds.

🧰 Development Environment (DevContainer + Docker)

Follow these steps to set up your local development environment:

  1. Clone the repository:

    git clone https://github.com/santarsierilorenzo/nova-pg.git
    
  2. Copy the example dev container configuration file:

    cp .devcontainer/devcontainer.json.example .devcontainer/devcontainer.json
    
  3. Open VS Code and rebuild the container without cache:

    Ctrl + Shift + P → Rebuild Container Without Cache and Reopen in Container
    
  4. Once the Docker container is running, you’ll have access to all required dependencies and tools pre-installed.

🐘 Get Started

  1. Copy db_config.json.example, rename it to db_config.json, and fill it with your database credentials.

  2. Import the package:

import nova_pg
  1. Load your database credentials from db_config.json:
db_cred = nova_pg.config.load_db_config(
    config_file_path="path_to_your_json",
    env_name="dev"
)
  1. Build your connection string:
url_db = nova_pg.config.build_connection_string(
    db_cred_dict=db_cred
)
  1. Use functions in the utils module:
QUERY = """
SELECT *
FROM prices.nq_1_min
"""

with nova_pg.utils.get_cursor(url_db) as cur:
    cols, data = nova_pg.utils.fetch_in_chunks(
        cur=cur,
        query=QUERY,
        table_name="nq_1_min",
        batch_size=10000            
    )

Metadata

Release files for nova-pg 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nova-pg 0.2.6
File Size Uploaded
nova_pg-0.2.6.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nova-pg 0.2.6
File Interpreter ABI Platform
nova_pg-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / nova_pg-0.2.6.tar.gz

Download URL nova_pg-0.2.6.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
413b8ea7170aeb506b5543b099f4902d18ea07a0635a0b46c3e4b817559221fc
BLAKE2b-256 checksum
How to use checksums
a6304e70ecbf2a2d3d7df141acd20d1ac421f21b371ced2ae791c680c267f2c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / nova_pg-0.2.6-py3-none-any.whl

Download URL nova_pg-0.2.6-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ccd4df4c30fa595f7f3ba25ef49f94a24c38da24c7b6615e00eeffd0d57240c
BLAKE2b-256 checksum
How to use checksums
1e2839836fd797066888d795772a50993d1cf631dc9900e9c49a855023343953
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page