This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: This library has been discontinued and is no longer supported. Please migrate to the recommended alternative.
LIneA Database Library
Python library to access LIneA's database from Python code. Useful to retrieve data inside LIneA's JupyterHub platform.
Authors
Installation
Install dblinea with pip
pip install dblinea
Requirements
- sqlalchemy>=1.4.25
- psycopg2>=2.9.1
- numpy>=1.19.4
- pandas>=1.2.0
- astropy>=5.0.0
pip install sqlalchemy psycopg2 numpy pandas astropy
Future plans
Sub-package to allow users to send user-generated data products to LIneA Science Server (e.g., a list of targets for visual inspection).
Development
Python 3.8: https://tecadmin.net/install-python-3-8-ubuntu/
- Dependencias:
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev liblzma-dev
python3.8 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install wheel setuptools twine pytest pytest-runner pytest-cov black
Executar os testes:
python setup.py pytest --cov --cov-report term-missing --cov-report html
Fazer o Build: https://medium.com/analytics-vidhya/how-to-create-a-python-library-7d5aea80cc3f
python setup.py sdist bdist_wheel
Testando o pacote apos o build
python3.8 -m venv venv
source venv/bin/activate
pip install sqlalchemy psycopg2 numpy pandas astropy
Para instalar usando o pacote local
pip install --force-reinstall <path>/dist/wheelfile.whl
Abrir um terminal e importar a classe DBBase. ou utilizar o comando.
python -c 'from dblinea import DBBase'
Outro Teste
(env) glauber: ~ $ python
Python 3.8.12 (default, Jan 28 2022, 15:50:21)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dblinea import DBBase
>>> a = DBBase()
>>> a.get_engine()
Engine(postgresql+psycopg2://untrustedprod:***@desdb4.linea.gov.br:5432/prod_gavo)
>>>
Publish in PyPi Test
Check if build is ok for publish
python -m twine check dist/*
python -m twine upload --verbose --repository testpypi dist/*
Check in https://test.pypi.org/manage/project/dblinea/releases/
Publish in PyPi Oficial
https://realpython.com/pypi-publish-python-package/
twine upload dist/*
Executar o Lint em busca de errors de sintaxe ou formatação.
black . --check
Executar o Lint para corrigir automaticamente os errors encontrados.
black .
Documentation with sphinx
Generate Api Docs
cd docs
sphinx-apidoc -f -o ./source ../dblinea
Build html docs
make html
TODO: Trocar Coveralls por codecov https://about.codecov.io/
Metadata
Release files for dblinea 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dblinea-1.0.0.tar.gz | 14.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dblinea-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.0 kB
Release files / dblinea-1.0.0.tar.gz
| Download URL | dblinea-1.0.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dc43fb178700361c1ce684b511d5306e7628f140fbda8d414c5a1b58e9f4b3e
|
|
BLAKE2b-256 checksum How to use checksums |
c531001eb13b25203ebc18c2a9398b826fe6a5c198044174547a5b24f2054f93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.17
|
Release files / dblinea-1.0.0-py3-none-any.whl
| Download URL | dblinea-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eac0bed67f3f1745612590b9a76c3fc51441d9b1a2431fdd3a82bbd159216af4
|
|
BLAKE2b-256 checksum How to use checksums |
5e6f2028be8395094cc7162245b237c6d7698f4edeca88298f584cf26c76b22a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.17
|
Security for dblinea 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.