Skip to main content

Auto Create Retrieve Update Delete ORM Functionality for Param models using SQL alchemy.

Project description

auto_crud_param

Auto Create Retrieve Update Delete ORM Functionality for Param models using SQL alchemy.

Installation:

Install with pip:

pip install auto-crud-param

Example Usage:

import param as pm
from sqlalchemy import create_engine
from sqlalchemy.orm import declarative_base, sessionmaker

from auto_crud_param import parameterized_to_model

Base = declarative_base()


# Example usage
class A(pm.Parameterized):
    name = pm.String(default='Item A')
    value = pm.Number(default=0)


AModel = parameterized_to_model(A, Base)

# Set up the database (for example, using SQLite)
engine = create_engine('sqlite:///mydatabase.db')
Base.metadata.create_all(engine)
Session = sessionmaker(bind=engine)

Development

To run the package locally you need python, git, and poetry.

git clone git@github.com:longtailfinancial/auto_crud_param.git
cd git@github.com:longtailfinancial/auto_crud_param.git
poetry install
poetry shell
python example.py

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

auto_crud_param-0.2.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

auto_crud_param-0.2.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file auto_crud_param-0.2.1.tar.gz.

File metadata

  • Download URL: auto_crud_param-0.2.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/6.5.6-76060506-generic

File hashes

Hashes for auto_crud_param-0.2.1.tar.gz
Algorithm Hash digest
SHA256 32bd129057f1b320d06232170d4bc0b7eb1247598d70380a33f7f43229b85ccb
MD5 a82ca7faa41764e61f9bb03e53484303
BLAKE2b-256 83548b13d6e6608771fdc822bbf671792016c40f40b05d9126d4c159d1be4500

See more details on using hashes here.

File details

Details for the file auto_crud_param-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: auto_crud_param-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/6.5.6-76060506-generic

File hashes

Hashes for auto_crud_param-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b224a2ed63339a38d96d7debc5b2ac40717a057d0849be72f1516b120325fd5
MD5 3cc3569156bd270b99d96d0de73fe2f9
BLAKE2b-256 66608eb703057f528d6b6fb0557fe5bf3d0956544bcef5505106a351e0fc4107

See more details on using hashes here.

Supported by

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