Skip to main content

DB schema and sqlalchemy db models for fibrenest

Project description

fibrenest_db_models

This is the DB schema and sqlalchemy db models for fibrenest

Usage

You would want to install this module in your project and then import the needed db model.
There is separate model if the backend DB is postgres.

Installation

pip install fibrenest-db-models

Example import for postgres

from fibrenest_db_models.postgres import Base, ONT, CPE, CUSTOMER

Example import for all other DBs

from fibrenest_db_models import Base, ONT, CPE, CUSTOMER

Creating the DB and tables

If the DB is not created, then you would need to first create the DB. Use sqlalchemy-utils for this.

After the DB is created, you can connect to this DB and create tables. Detailed instructions here

engine = create_engine('sqlite:///test.db')
Base.metadata.create_all(engine)

Models

  1. ONT: Table for ONTs info
  2. CPE: Table for CPEs
  3. CUSTOMER: Table for customers
  4. SERVICE: Table for services associated to the customers

Project details


Download files

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

Files for fibrenest-db-models, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size fibrenest_db_models-0.1.3-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size fibrenest_db_models-0.1.3.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page