Easy access to access DES DB. Command line interpreter client for DESDM
Project description
# easyaccess
![help_screen](help_screenshot.png)
Refactored version of trivialAccess for accessing the DES DB
Python Command Line Interpreter to access Oracle DES DB
using cx_Oracle
For a short tutorial (To be completed) chek [here](http://deslogin.cosmology.illinois.edu/~mcarras2/data/DESDM.html)
(Using des credentials)
**Current version = 1.1.0**
## Requirements
- Oracle Client > 11g.2 (External library, no python)
Check [here](https://deswiki.cosmology.illinois.edu/confluence/display/CMBT/Instructions+for+installing+Oracle+client+and+easyaccess+without+EUPS) for instructions on how to install these libraries
- [cx_Oracle](https://bitbucket.org/anthony_tuininga/cx_oracle)
- [fitsio](https://github.com/esheldon/fitsio) >= 0.9.6
- [pandas](http://pandas.pydata.org/) >= 0.14
- [termcolor](https://pypi.python.org/pypi/termcolor)
- [PyTables](http://pytables.github.io/) (optional, for hdf5 output)
## Some *nice* features
- Smart tab completion for commands, table names, column names and file paths accordingly
- write output results to csv, tab, fits files or HDF5 files
- load tables from csv or fits directly into DB
- intrinsic db commands to describe tables, own schema, quota and more
- It can be imported as module
- Can run command directly from command line
- Load sql query from file and/or from editor
- Many more
## Basic use
### Running SQL commands
Once inside the interpreter run SQL queries by adding a ; at the end::
DESDB ~> select ... from ... where ... ;
To save the results into a table add ">" after the end of the query (after ";") and namefile at the end of line
DESDB ~> select ... from ... where ... ; > test.fits
The files supported so far are (.csv, .tab, .fits, .h5) any other extension is ignored
### Load tables
To load a table it needs to be in a csv format with columns names in the first row
the name of the table is taken from filename
DESDB ~> load_table <filename>
### Load SQL queries
To load sql queries just run:
DESDB ~> loadsql <filename.sql>
or
DESDB ~> @filename.sql
The format is the same as in command line, SQL statement must end with ;
and to write output files it must be followed by > <output file>
### TODO
- There is a bug with some versions of readline
- Other small changes when loading tables
- Self-upgrade
![help_screen](help_screenshot.png)
Refactored version of trivialAccess for accessing the DES DB
Python Command Line Interpreter to access Oracle DES DB
using cx_Oracle
For a short tutorial (To be completed) chek [here](http://deslogin.cosmology.illinois.edu/~mcarras2/data/DESDM.html)
(Using des credentials)
**Current version = 1.1.0**
## Requirements
- Oracle Client > 11g.2 (External library, no python)
Check [here](https://deswiki.cosmology.illinois.edu/confluence/display/CMBT/Instructions+for+installing+Oracle+client+and+easyaccess+without+EUPS) for instructions on how to install these libraries
- [cx_Oracle](https://bitbucket.org/anthony_tuininga/cx_oracle)
- [fitsio](https://github.com/esheldon/fitsio) >= 0.9.6
- [pandas](http://pandas.pydata.org/) >= 0.14
- [termcolor](https://pypi.python.org/pypi/termcolor)
- [PyTables](http://pytables.github.io/) (optional, for hdf5 output)
## Some *nice* features
- Smart tab completion for commands, table names, column names and file paths accordingly
- write output results to csv, tab, fits files or HDF5 files
- load tables from csv or fits directly into DB
- intrinsic db commands to describe tables, own schema, quota and more
- It can be imported as module
- Can run command directly from command line
- Load sql query from file and/or from editor
- Many more
## Basic use
### Running SQL commands
Once inside the interpreter run SQL queries by adding a ; at the end::
DESDB ~> select ... from ... where ... ;
To save the results into a table add ">" after the end of the query (after ";") and namefile at the end of line
DESDB ~> select ... from ... where ... ; > test.fits
The files supported so far are (.csv, .tab, .fits, .h5) any other extension is ignored
### Load tables
To load a table it needs to be in a csv format with columns names in the first row
the name of the table is taken from filename
DESDB ~> load_table <filename>
### Load SQL queries
To load sql queries just run:
DESDB ~> loadsql <filename.sql>
or
DESDB ~> @filename.sql
The format is the same as in command line, SQL statement must end with ;
and to write output files it must be followed by > <output file>
### TODO
- There is a bug with some versions of readline
- Other small changes when loading tables
- Self-upgrade
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easyaccess-1.1.0.tar.gz
(109.1 kB
view details)
Built Distribution
File details
Details for the file easyaccess-1.1.0.tar.gz
.
File metadata
- Download URL: easyaccess-1.1.0.tar.gz
- Upload date:
- Size: 109.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71914cec0486be60a63e5bd4e201ab5bd67a9a604be937c059d061905b1e7c83 |
|
MD5 | 83ec7a5937fe1857751adc6aab8b19e2 |
|
BLAKE2b-256 | 4e2827e8c2136dec3cf54a6d008753ef9469aa3461f8bff2d16d7d438afc745a |
File details
Details for the file easyaccess-1.1.0.macosx-10.6-x86_64.exe
.
File metadata
- Download URL: easyaccess-1.1.0.macosx-10.6-x86_64.exe
- Upload date:
- Size: 106.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b15a7d0b17746fff52ab5d28afd4bfe2bd6b27e79fa041258642cbadbac63ad |
|
MD5 | 851c8ac2b296b8be931a32d532408b72 |
|
BLAKE2b-256 | 3c5125c61e6a981963ea7ba7f221a224e4985c3205ed46e4e88c6abeb3bb1adb |