Skip to main content

Functions I use regularly with my python projects

Project description

Sands Python Functions

Code style: black

Some functions I find useful regularly and I put them all into one package for easy access

I created this using Poetry.

Instructions

  • To build this you must first install poetry see instructions here
  • However to make it easy to access this is all of the code you'll need on linux to make this run (note that I use zsh not bash for my shell)
    • First you must navigate to the folder containing these files CHANGELOG.md LICENSE 'README reference.md' README.md dist poetry.lock pyproject.toml src
    • You then to make sure that you have the python environment that you want activated
    • You can then enter the code below
# installation on linux
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
# check version
poetry --version
# update poetry
poetry self update

# set up virtual environment using pyenv
python -m venv venv
# activate the virtual environment
source ./venv/bin/activate
# upgrade pip
python -m pip install --upgrade pip

# Initialising a pre-existing project (not already managed by poetry)
cd pre-existing-project
poetry init

# poetry add (or remove) PackageName
poetry add PackageName
poetry remove PackageName
# update the poetry.lock file
poetry update
# The build command builds the source and wheels archives
poetry build
# The install command reads the pyproject.toml file from the current project, resolves the dependencies, and installs them.
poetry install
# this will publish the package
poetry publish

Basic Usage Example

TODO:

Included Packages

Functions from EmailFunctions

Functions from MultiprocessingFunctions

Functions from ParquetFunctions

Functions from PrintFunctions

Functions from TimerFunctions

CI/CD

See this repo for an example of someone using poetry with they're python project to upload to PyPI on push to master.

Other Notes About This Code

I use "TESTCODE:" to designate code used in testing functions and scripts. I try to make sure to comment or delete those lines in the release versions of the package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SandsPythonFunctions-0.1.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

SandsPythonFunctions-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file SandsPythonFunctions-0.1.0.tar.gz.

File metadata

  • Download URL: SandsPythonFunctions-0.1.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.7 Linux/4.19.128-microsoft-standard

File hashes

Hashes for SandsPythonFunctions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 be6507380f581f8d7b7ed0166bb834d2eda783be883da594f5a23d0d51c12251
MD5 ec64d3f2a99a2fbf3843110640f5fef6
BLAKE2b-256 47c66087edd8c6e13cf99340221e0ab10b963ed75596c92ad78aed08fbb48042

See more details on using hashes here.

File details

Details for the file SandsPythonFunctions-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: SandsPythonFunctions-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.7 Linux/4.19.128-microsoft-standard

File hashes

Hashes for SandsPythonFunctions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5213b4a2e3d3c400bfef7049f949f33eec0a8296d753fbb1ee22c6ec1c4e96e6
MD5 7f2886e08f62d130b190d554d7092742
BLAKE2b-256 2cb5f3ce8a54df45ab5b47a9740d60889345f278021797df9e866e56b1222c12

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page