Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shardulnalegave/use.py
A Library For Dynamically Importing Modules. Inspired By Node.js `require` Function.
https://github.com/shardulnalegave/use.py
dynamic-modules import importlib modules python-2 python-3 python-package
Last synced: 1 day ago
JSON representation
A Library For Dynamically Importing Modules. Inspired By Node.js `require` Function.
- Host: GitHub
- URL: https://github.com/shardulnalegave/use.py
- Owner: ShardulNalegave
- License: mit
- Created: 2018-08-01T15:33:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-01T15:34:47.000Z (about 6 years ago)
- Last Synced: 2024-10-01T20:25:19.465Z (1 day ago)
- Topics: dynamic-modules, import, importlib, modules, python-2, python-3, python-package
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Use
A Library For Dynamically Importing Modules. Inspired By **Node.js** `require` Function.-----------------------------------------------------------------------------------------------------------
## Installation
Use can be installed using Pip by the command:-````
[sudo] pip install use
````
## Usage
If the file structure is like:-````
test/
test/
__init__.py
test.py
utils/
__init__.py
utils.py````
If you want to import `test/test/__init__.py` in the file `test/test/utils/utils.py` it is not possible, but using **Use** you can do it by putting the following snippet in `test/test/utils/utils.py` file.
````
from use import use
initFile = use("./../__init__")
````
-----------------------------------------------------------------------------------------------------------
**License Under The [MIT](./LICENSE) License**
**A Project By [Shardul Nalegave](https://shardul.netlify.com)**