Find project modules and data files (packages and package_data for setup.py).
Project description
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'
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
dephell_discover-0.2.9.tar.gz
(12.5 kB
view details)
Built Distribution
File details
Details for the file dephell_discover-0.2.9.tar.gz
.
File metadata
- Download URL: dephell_discover-0.2.9.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e358f8d56169bc1a63e5d560f4e1818e8eeb7c08330f6ae783282098eb817688 |
|
MD5 | 2e056a6abb492a90f25f48b3adf14597 |
|
BLAKE2b-256 | f2280ea6994e2a2b0e5193b22eac6e99fd9bf11ae2bd8fa0cb52f9d8f5a6964e |
File details
Details for the file dephell_discover-0.2.9-py3-none-any.whl
.
File metadata
- Download URL: dephell_discover-0.2.9-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e97d928a90477d583af68232cd2db6af351593e146d5dcb6f4c51e681908ceea |
|
MD5 | f19669f646e6a65f23af19179260d865 |
|
BLAKE2b-256 | 1778ae7e5cee9fd9f8142b7e10367457712dbff2afe930c845880de64bf8adf1 |