Skip to content

simphony/simphony-sqlalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLAlchemy Wrapper

Wrapper for SQLAlchemy developed by the Materials Informatics team at Fraunhofer IWM. Tested with SQLite and Postgresql backends.

Requirements

The SQLAlchemy wrapper is built on top of the OSP core package. The following table describes the version compatibility between these two packages.

SQLAlchemy wrapper OSP core
1.0.0 3.1.x-beta
2.0.0 3.2.x-beta
2.1.[0-1] 3.3.[1-8]-beta
2.1.2 3.4.X-beta
2.2.0 3.5.X-beta
2.2.1 3.5.X-beta
2.2.X >= 3.5.0-beta, < 4.0.0rc0

The releases of OSP core are available here. Releases of OSP core are also available on PyPI starting from version 3.7.0.

Additional required packages

  • sqlalchemy
  • psycopg2

The easiest way to run an sqlalchemy server is to use docker:

docker run -d -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=123-postgres -e POSTGRES_DB=postgres -e POSTGRES_HOST=db -p 5432:5432 --name postgres --restart=always postgres:11.7

Installation

The package requires python 3 (tested for 3.7), installation is based on setuptools.

# build and install
pip install .

or

# build for in-place development
pip install -e .

Testing

Testing is included in setuptools:

# run tests automatically
python3 setup.py test

Directory structure

  • sqlalchemy_wrapper -- sqlite wrapper files.
  • tests -- unittesting of the code.
  • doc -- documentation related files.
  • examples - examples of usage.