My python libs to handle common tasks
Go to file
Benjamin Renard 7b1019cb1b Add oracle lib
Based on mylib.pgsql.PgDB exiting lib and cx_Oracle, 
mylib.oracle.OracleDB provide an easy way to execute simple SQL query on 
an Oracle Database server.
2021-11-07 22:00:21 +01:00
mylib Add oracle lib 2021-11-07 22:00:21 +01:00
tests Add oracle lib 2021-11-07 22:00:21 +01:00
.gitignore Switch to module style lib, make python3 compatibility and clean code 2021-05-19 18:07:42 +02:00
.pylintrc Code cleaning 2021-05-19 19:19:57 +02:00
HashMap.py Fix indents 2018-12-12 17:23:27 +01:00
README.md Add requirements 2021-06-03 15:50:41 +02:00
setup.cfg Code cleaning 2021-05-19 19:19:57 +02:00
setup.py Add oracle lib 2021-11-07 22:00:21 +01:00

Python MyLib

Just a set of helpers small libs to make common tasks easier in my script development.

Requirements

apt install \
    gcc \
    libldap2-dev \
    libsasl2-dev \
    libpq-dev \
    libmariadb-dev \
    python3 \
    python3-dev

Installation

Just run python setup.py install

Note: This project could previously use as independent python files (not as module). This old version is keep in legacy git branch (not maintained).

Include libs

  • mylib.email.EmailClient: An email client to forge (eventually using template) and send email via a SMTP server
  • mylib.ldap.LdapServer: A small lib to make requesting LDAP server easier. It's also provide some helper functions to deal with LDAP date string.
  • mylib.mysql.MyDB: An extra small lib to remember me how to interact with MySQL/MariaDB database
  • mylib.pgsql.PgDB: An small lib to remember me how to interact with PostgreSQL database. Warning: The insert/update/delete/select methods demonstrate how to forge raw SQL request, but it's a bad idea: Prefer using prepared query.
  • mylib.opening_hours: A set of helper functions to deal with french opening hours (including normal opening hours, exceptional closure and nonworking public holidays).
  • mylib.pbar.Pbar: A small lib for progress bar
  • mylib.report.Report: A small lib to implement logging based email report send at exit

To know how to use these libs, you can take a look on mylib.scripts content or in tests directory.

Copyright (c) 2013-2021 Benjamin Renard brenard@zionetrix.net

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.