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 into
mykit/mykit/kit/
- deleted
mykit/mykit/kit/math/
- added
mykit/mykit/rec/
andmykit/mykit/app/
- transform
mykit/mykit/kit/color/
->mykit/mykit/kit/color.py
- moved
mykit/mykit/kit/color/test_color.py
tomykit/tests/test_kit/test_color.py
- transform
mykit/mykit/kit/ffmpeg/
->mykit/mykit/kit/ffmpeg.py
- deleted
mykit/mykit/kit/graph/graph2d/
- transform
mykit/mykit/kit/graph/graph2d/v2.py
->mykit/mykit/kit/graph/graph2d.py
- transform
mykit/mykit/kit/maths/
->mykit/mykit/kit/math.py
- moved
mykit/mykit/kit/maths/test_maths.py
->mykit/tests/test_math.py
- transform
mykit/mykit/kit/noise/
->mykit/mykit/kit/noise.py
- transform
mykit/mykit/kit/path/
->mykit/mykit/kit/path.py
- transform
mykit/mykit/kit/text/
->mykit/mykit/kit/text.py
- transform
mykit/mykit/kit/time/
->mykit/mykit/kit/time.py
- transform
mykit/mykit/kit/utils/
->mykit/mykit/kit/utils.py
- migrated all modules from carbon into
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.2.tar.gz
.
File metadata
- Download URL: mykit-0.1.2.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 205eb7559172c448f21a2397c0e0040bfee07b89bdbac063205a4213e6a2b769 |
|
MD5 | 5110c0ebdb2128813424bc50eb125afe |
|
BLAKE2b-256 | 6a44bf84cb21ad7b6a34a9e32fea00d739b2e253d5955983ed45ef43314ab559 |
File details
Details for the file mykit-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: mykit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 45.6 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 | 9da9a67cd3ecd411c202ca3a35a87ac2a2e1a933172e8b8c24e6a43a1d4fe7b3 |
|
MD5 | 1541994528adff86cabfdeaad879500a |
|
BLAKE2b-256 | 58b3830b60e65b230e6c73eee8232310ae5f14f3ad65aa746c03e9d1833b17ab |