traitlets_paths
Traitlets module for pathlib
This package defines traitlets for all pathlib objects.
Getting Started
Install from pip:
pip install traitlets_paths
Basic Example
from traitlets import HasTraits, default
from traitlets_paths import PurePath
class Foo(HasTraits):
path = PurePath()
@default('path')
def _default_path(self):
return 'path/to/foo'
foo = Foo()
foo.path
# On Posix systems
PurePosixPath('path/to/foo')
# or on Windows systems
PureWindowsPath('path/to/foo')
How to get a TraitError
When we try passing a bad type:
foo = Foo(path=5)
we get a TraitError:
TraitError: The 'path' trait of a Foo instance must be a pathlib.PurePath trait, but a value of 5 <class 'int'> was specified.
Developing
Download and install this repo from source, and move into the base directory.
git clone https://github.com/Zsailer/traitlets_paths
cd traitlets_paths
If you use pipenv, you can install a developement version:
pipenv install --dev
Otherwise you can install a development version using pip
pip install -e .
Licensing
The code in this project is licensed under MIT license.
Metadata
Release files for traitlets-paths 0.1.3
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 | Actions |
|---|---|---|---|---|
| traitlets_paths-0.1.3.tar.gz | 2.3 kB | Without provenance | Details for traitlets_paths-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| traitlets_paths-0.1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for traitlets_paths-0.1.3-py2.py3-none-any.whl |
Total release size: 5.8 kB
Release files / traitlets_paths-0.1.3.tar.gz
| Download URL | traitlets_paths-0.1.3.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1ba6cacd220b7ba2d357ffd28488cec2c45d4bc687eab7f8bb54df1f618809a
|
|
BLAKE2b-256 checksum How to use checksums |
1561ffc36a5e8f876433fec95c880591390ff696e7e85e10fa92514252135144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Release files / traitlets_paths-0.1.3-py2.py3-none-any.whl
| Download URL | traitlets_paths-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f72f81463ad97933ec11a5e2bea56dad37f97acde206db7528f4e85b07f9b558
|
|
BLAKE2b-256 checksum How to use checksums |
8206427ae688548d7bfa6b99b0a708ca8e81a132da7da56fa5a9f1fdea857a10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Security for traitlets-paths 0.1.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.