Python utility library
Project description
myKit
This is a Python toolkit that bundles handy utility functions such as color interpolations, activation functions, Perlin noise, and others. The aim is to build them from the ground up to help understand how they work.
Quick Tip: If you're here because you need to run a specific project that uses this module, you can jump directly to the Installation section.
Installation
-
Manual:
-
Download the latest version
-
Remove the version number (
carbon-1.x.x
->carbon
) -
Place it in a folder where Python can recognize it as a module (e.g.
~/code/carbon
) -
Install dependencies:
-
libraries:
pip install -r /path/to/carbon/requirements.txt
or navigate to the
carbon
folder:pip install -r requirements.txt
-
FFmpeg (optional, if the project needs it. Any version should be okay, but version 5 or latest is recommended)
-
-
Usage
-
check the version:
python carbon -v
-
Basic:
from carbon.ffmpeg import get_audio_sample_rate from carbon.gui.button import Button from carbon.time import get_sexagecimal from carbon.utils import minmax_normalization
-
Testing:
python -m unittest
python carbon\_testing\noise#__init__.py#perlin_noise_1d.py
Compatibility purposes
TL;DR: It's recommended to always use the latest version.
Sometimes, when I need to add a feature or make big changes, I find starting over is the least stressful way to ensure older projects don't break. Here's how I manage the generations across the module.
Minor (argument order, scaling, generalization, etc.):
carbon.mdl.fn
->carbon.mdl.fn2
carbon.mdl.fn
->carbon.mdl.v2.fn
Major (data structure, component relations, overall usage, etc.):
carbon.mdl.Class
->carbon.mdl_v2.Class
carbon.module
->carbon.module_new_name
Mostly, basic functions (standalone, input-in-output-out) are the ones that undergo Minor changes. Major changes are mostly expected in structured things like big modules (interconnected functions, specific usage rules).
FAQ
-
About this module:
-
Compatibility:
Latest version is always compatible with older versions (e.g.,
carbon-1.3.0
works with projects that usecarbon-1.0.0
orcarbon-1.2.0
)
Changelog
- 0.1.0 (June 12, 2023):
- migrated all modules from
carbon
intomykit/src/kit
- deleted
mykit/src/math
- added
mykit/src/rec
- migrated all modules from
Troubleshoot
- If Python can't find the module, as indicated by
ModuleNotFoundError: No module named 'carbon'
, try putting it in Python's standard folder for external libraries (~/Python3/Lib/site-packages
). - To report bugs/issues or ask questions, you can reach me here or open an issue/pull request.
License
This project is licensed under the MIT license.
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
Built Distribution
File details
Details for the file mykit-0.1.0.tar.gz
.
File metadata
- Download URL: mykit-0.1.0.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4c7db2198aba8d31fce8f599e8ed7566c672085ca15421e5b25cd81cb14e696 |
|
MD5 | f4b29d4e1c51da4dab83d05cdb3fc45d |
|
BLAKE2b-256 | 64fa375bf20e80f3754952b670aeea3e5cca0e3b682f739637829b90cb5a3b29 |
File details
Details for the file mykit-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mykit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 49.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b70043271da5c169d1a6fa3482f7c77987bb357c45c92744c11bc713b283988 |
|
MD5 | c03a7e9d4f1bc3dc428bfbbded98e058 |
|
BLAKE2b-256 | 90a5be41a532e43425323cfd7c6d66259b4f0910d5b5aa69bd964c5a7bbe4a94 |