/py-utilities

An all-in-one package containing a collection of self-implemented Python packages/frameworks/libraries (the following will collectively be known as 'library') such that you can add this into a project as a submodule and you can import the libraries directly

Primary LanguagePythonMIT LicenseMIT

My All-in-One library/package/framework collection for Python

Information

Background Summary

  • A python one-stop-shop mono-repo containing various useful python utilities, packages/frameworks/libraries that you can just install and use

Project

  • Current Version: v0.5.4

Setup

Dependencies

  • python3
  • pip

Pre-Requisites

  • Generate Python Virtual Environment
    • Create Virtual Environment
      python3 -m venv [virtual-environment-name]
    • Chroot into Virtual Environment
      • Linux
        . [virtual-environment-name]/bin/activate
      • Windows
        .\[virtual-environment-name]\Scripts\activate

Installing

  • Using python pip

    • Install git repository
      python3 -m pip install git+https://github.com/Thanatisia/py-utilities{@[branch-tag-name]}
    • Using requirements.txt
      • Create 'requirements.txt'
        pyutils @ git+https://github.com/Thanatisia/py-utilities{@[branch-tag-name]}
        
      • Install pip packages using 'requirements.txt'
        python3 -m pip install -Ur requirements.txt
  • Manually via cloning

    • Clone git repository
      git clone https://github.com/Thanatisia/py-utilities
    • Change directory into project root
      cd py-utilities
    • (Optional) Install python dependencies
      python3 -m pip install -Ur requirements.txt
    • Install package as development mode
      pip install .
    • (Optional) Uninstall package
      pip uninstall py-utilities

Embedding library in your own project

  • Change directory into your project root containing the git folder

    cd [project-root]
  • Importing as a git submodule

    git submodule add https://github.com/Thanatisia/py-utilities

Following usage setup

  • Initialize git submodule databases

    git submodule --init
  • Clone all submodules in the submodule database/list

    git submodule update --init

Documentations

Demo

  • Please refer to demo.md for all demo animation GIFs and examples

Generating Demo animation gif

  • Using Makefile
    • Pre-Requisites
    • Optionals
      • Edit the command by prepending with 'command="[new-command-here]""
    • Notes
      • Set 'command=""' to enter into terminal session recording for manual shell input, allowing for manual user input
    make -f docs/documentation.gif record convert

Wiki

Project Structure

  • root/
    • src/
      • pyutils/
        • decorators/ : Place all decorator wrapper libraries here
        • frameworks/ : Place all frameworks and multi-library files here
        • libraries/ : Place all standalone libraries/modules and classes here
        • scripts/ : Place all scripts/CLI utilities here

Resources

References

Remarks