dbcluster

Python Database Cluster Session Manager

https://github.com/krishardy/dbcluster

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.2%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Python Database Cluster Session Manager

Basic Info
  • Host: GitHub
  • Owner: krishardy
  • License: other
  • Language: Python
  • Default Branch: master
  • Size: 14.6 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 7
  • Releases: 0
Created over 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

dbcluster: Database Cluster Session Manager

Kris Hardy kris@abqsoft.com

NOTE: This code is in early beta and is under active development. Please use carefully until the code stabalizes into version 1.0 (target: May 2019)

This database engine manager manages master/slave database connections and session management. This is useful for applications which need to manage sqlalchemy database engines and sessionmakers for master/slave database clusters.

Example usage:

```python import sqlalchemy from dbcluster import MasterSlaveManager manager = MasterSlaveManager()

Set up the master(s)

manager.appendmaster( sqlalchemy.createengine('postgresql://127.0.0.1:5432'), orm=MasterSlaveManager.ORM_SQLALCHEMY )

Set up slaves

manager.appendslave( sqlalchemy.createengine('postgresql://127.0.0.1:5433'), orm=MasterSlaveManager.ORM_SQLALCHEMY )

manager.appendslave( sqlalchemy.createengine('postgresql://127.0.0.1:5435'), orm=MasterSlaveManager.ORM_SQLALCHEMY )

Use the database sessions

with manager.mastersessionctx() as dbsession: # Do something with the session ... dbsession.commit()

with manager.slavesessionctx() as dbsession: # Returns a random slave session # Do something with the session ... dbsession.commit()

with manager.slavesessionctx(0) as dbsession: # Returns a session to the first slave # Do something with the session ... dbsession.commit() ```

Owner

  • Name: Kris Hardy
  • Login: krishardy
  • Kind: user
  • Location: Auckland, NZ

GitHub Events

Total
  • Push event: 2
  • Pull request event: 1
  • Create event: 2
Last Year
  • Push event: 2
  • Pull request event: 1
  • Create event: 2

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 1
  • Total Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Kris Hardy k****s@r****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • krishardy (12)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 8 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
pypi.org: dbcluster

Database Cluster Session Manager

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 8 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Forks count: 29.8%
Average: 31.4%
Stargazers count: 38.8%
Downloads: 56.5%
Maintainers (1)
Last synced: 11 months ago

Dependencies

dev-requirements.txt pypi
  • mock * development
  • pytest * development
  • pytest-cov * development
  • sqlalchemy * development
  • tox * development
  • twine * development
requirements.txt pypi
  • future *
setup.py pypi
  • line.strip *