Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.9%) to scientific vocabulary
Repository
Simple object to navigate complex python objects
Basic Info
- Host: GitHub
- Owner: thorwhalen
- License: apache-2.0
- Language: Python
- Default Branch: master
- Size: 29.3 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
guide
Simple object to navigate complex python objects
To install: pip install guide
Examples
Object that provides a mapping interface to the attributes of python object.
The keys will be the names of the attributes and the values will be Attrs instances of said attributes.
```pydocstring
import guide from guide import Attrs a = Attrs(guide) sorted(a) # you would usually use
listinstead ofsortedbut the latter is used for test consistency ['Attrs', 'ObjReader', 'base', 'util'] aa = a['Attrs'] sorted(aa) ['get', 'head', 'items', 'keys', 'modulefrompath', 'updatekeyscache', 'values'] ```
Here's how you could implement a generator of paths (tuples) of internal module of a given module:
```python from guide import Attrs import inspect
def internalmodules(module, path=()): if not isinstance(module, Attrs): module = Attrs(module) prefix = module.src.name_ for k, v in module.items(): if inspect.ismodule(v.src) and v.src.name.startswith(prefix): yield path + (k,) yield from internal_modules(v, path=path + (k,)) ```
```pydocstring
import guide for path in internalmodules(guide): ... print(path) ('tools',) ('tests',) ('tests', 'simpletests') ('base',) ('util',) ```
Recursively collecting objects from modules, submodules, attributes...
The base function for this is guide.tools.recollect.
The following submodule_callables is simply constructed from recollect.
```pydocstring
import guide print(*sorted(set(x.name for x in guide.tools.submodulecallables(guide))), sep='\n') Attrs ObjReader copyattrs internalmodules isanobjofmodule ishashable notunderscoreprefixed recollect submodule_callables ```
Owner
- Name: Thor Whalen
- Login: thorwhalen
- Kind: user
- Location: Mountain View, CA
- Company: Analog Devices
- Website: https://www.linkedin.com/in/thorwhalen/
- Repositories: 90
- Profile: https://github.com/thorwhalen
R&D in Machine Learning Systems
GitHub Events
Total
Last Year
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Thor Whalen | t****1@g****m | 16 |
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- dannys0401 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 152 last-month
- Total dependent packages: 1
- Total dependent repositories: 4
- Total versions: 8
- Total maintainers: 1
pypi.org: guide
Simple object to navigate complex python objects
- Homepage: https://github.com/thorwhalen/guide
- Documentation: https://guide.readthedocs.io/
- License: apache-2.0
-
Latest release: 0.0.8
published over 4 years ago