Find project modules and data files (packages and package_data for setup.py).
Installation
install from PyPI:
python3 -m pip install --user dephell_discover
Usage
Get root, packages, package_data, package dir:
from pathlib import Path
from dephell_discover import Root
root = Root(path=Path('../dephell'))
root.packages
# [Package(path=Path('../dephell/dephell'), root=Path('../dephell')), ...]
root.data
# {Data(path=Path('../dephell/dephell/templates'), ext='.j2', package=Package(...)), ...}
root.package_dir
# {'': '.'}
Package properties:
p = root.packages[-1]
p.path # Path('../dephell/dephell/commands')
p.root # Path('../dephell')
p.module # 'dephell.commands'
str(p) # 'dephell.commands'
list(p) # [Path('../dephell/dephell/commands/base.py'), ...]
Data properties:
d = next(iter(root.data))
d.path # Path('../dephell/dephell/templates')
d.ext # .j2
d.package # Package(path=Path('../dephell/dephell'), root=...)
d.module # 'dephell'
# relative path from package root:
d.relative # 'templates/*.j2'
str(d) # 'templates/*.j2'
list(d) # [Path('../dephell/dephell/templates/python.html.j2'), ...]
Meta information:
root.metainfo.summary
# 'Python project management.'
root.metainfo.authors
# ['Gram (@orsinium)']
root.metainfo.license
# 'MIT'
root.metainfo.version
# '0.7.0'
Metadata
Release files for dephell-discover 0.2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dephell_discover-0.2.10.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dephell_discover-0.2.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.8 kB
Release files / dephell_discover-0.2.10.tar.gz
| Download URL | dephell_discover-0.2.10.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2ad414e5e0fe16c82c537d6a3198afd9818c0c010760eccb23e2d60e5b66df6
|
|
BLAKE2b-256 checksum How to use checksums |
c04c8a4bcccd4b11d3a84825eccb44122b83137b0acc1a317c2ce3b324deb1b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / dephell_discover-0.2.10-py3-none-any.whl
| Download URL | dephell_discover-0.2.10-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
abf190e9707d4a88f14e91be1f80e996e195b20b5400da2362e98cf19e59a1e4
|
|
BLAKE2b-256 checksum How to use checksums |
a63770ceb569bd1492fdc192340e8a7e4847dfd71a712a1d5a6ff04d2b75d114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|