✨ EpicPath ✨
A high Level Python Library to work with Path
EpicPath is a SubClass of Path from pathlib.
This class aims to simplify high level operations with path
Context and history
I'm a Computing Student tired of creating again and again the same functions through all my projects to do the exact same things... 😫 Indeed, in every of my projects I create files, delete them, create folders and delete them blablabla ... To solve this boring problem, I decided to create my own library that I can create one and only one time to use and reuse as many times as I wish to. And because I'm trying to be nice to this cruel world I share this Epic project with all of you ❤️ So feel free to download it, use it and give feedback about this epic creation. 👍
Description
You already know Path from the library pathlib. Well, EpicPath is all like Path but in a EPIC way 🎉 .
It is a pseudo subclass of Path but consider it as a subclass, it supports all the methods and options of the original library.
It is also a os.PathLike object which allows you to use as you would want to:
with open(my_epic_path_object, 'w') as f:
f.write('This is epic !!!')
Use it
Install it
pip install epic-path
Use it
from epicpath import EpicPath as EPath
path = EPath('f1', 'f2') # EpicPath('f1/f2')
path2 = path / 'f3' # EpicPath('f1/f2/f3')
path2 += '_0' # EpicPath('f1/f2/f3_0')
⚠️ Warnings ⚠️
Because Path is build-in Python libraries, some other library
(like PIL or skopt)
can have a specific behavior when the given filename is a str or a Path object.
Unfortunately, they don't support an EpicPath object ... 😢 But no worries, it is still possible to give an EpicPath object as a Path object or a str object using the properties .path and .str:
path = EPath('f1', 'f2') # EpicPath('f1/f2')
weird_function(path.path) # Gives Path('f1/f2') to the function
weird_function(path.str) # Gives the string 'f1/f2' to the function
Metadata
Release files for epic-path 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| epic-path-0.1.1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| epic_path-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / epic-path-0.1.1.tar.gz
| Download URL | epic-path-0.1.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ad95fbd6671acd4c6b90a52a077b566578654f74ff81237651b1c1c7b3d7cd5
|
|
BLAKE2b-256 checksum How to use checksums |
12a5c36e650ef20b60b0c2a981cf034dfff0b3f8d85d66aada739c480298abc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3
|
Release files / epic_path-0.1.1-py3-none-any.whl
| Download URL | epic_path-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d81eeb2d494db54722ccd6739be8163065e9c368397ca53f93d12e58dd68622
|
|
BLAKE2b-256 checksum How to use checksums |
41a21b8924a194ebb4961611e25f2c2567b7fa536ce21eeb0ba54bf6442c7e17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3
|