unixpath
unix-style path processing functions
Why?
My goal was to provide posixpath path processing functions in pure Python (e.g. normpath, join, split, etc) minus any functions that rely on any kind of "filesystem" concept (stat, etc).
Basically, this is a "minimum viable unix path processing framework." Path processing functions are useful for e.g. ML libraries that want to use unix-style paths to refer to model variables.
(Honestly unixpath is kind of pointless. Its functions are copy-pasted from posixpath, so why not just import posixpath and not worry about the extra dependency on unixpath? Answer: because I was curious how Python implemented their unix path processing functions, so I made this library as a learning exercise.)
Install
python3 -m pip install -U unixpath
Usage
import unixpath
unixpath.join('a', 'b') # 'a/b'
unixpath.join('a', 'b', '..', 'c') # 'a/b/../c'
unixpath.normpath('a/b/../c') # 'a/c'
License
MIT
Contact
A library by Shawn Presser. If you found it useful, please consider joining my patreon!
My Twitter DMs are always open; you should send me one! It's the best way to reach me, and I'm always happy to hear from you.
- Twitter: @theshawwn
- Patreon: https://www.patreon.com/shawwn
- HN: sillysaurusx
- Website: shawwn.com
Metadata
Release files for unixpath 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 | Provenance | |
|---|---|---|---|---|
| unixpath-0.1.1.tar.gz | 4.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unixpath-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / unixpath-0.1.1.tar.gz
| Download URL | unixpath-0.1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06fd59fdbbd77f281b89c04a1afdc875cf970408340eae938e72070b5a9d7228
|
|
BLAKE2b-256 checksum How to use checksums |
476d3e3f7d3c7a7237d49b8f5b7620cb526094d2825adc15385de3ddc80fa018
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.9.5 Darwin/20.5.0
|
Release files / unixpath-0.1.1-py3-none-any.whl
| Download URL | unixpath-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e83d6953daec93006605a85bd89dc5e46c244a1eb4f6bd44d2bd0616c7c2f48
|
|
BLAKE2b-256 checksum How to use checksums |
cef8918606032b66d0efb6e770a40486c9ebe76dc58e7aad5ff4863b8c16190d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.6 CPython/3.9.5 Darwin/20.5.0
|
Security for unixpath 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.