contrib-extension
Project description
contrib extension
Introduction
자신이 직접 라이브러리를 구현할때 contrib 형태의 라이브러리 관리를 사용한다면 contrib extension 라이브러리는 자신의 라이브러리의 root에서 하위 라이브러리를 접근하는 데에 도움을 줄 수 있습니다.
If you use library management in the form of a content library when you implement your own library, the content extension library can help you access sub libraries from the root of your library.
Installation
```bash
pip install contrib-extension
```
Use
```python
"""
- test
- __init__.py
- test.py # main
- post.py
- __category__ = "board"
- __id__ = "post"
- set(self) -> return "ok"
- contrib
- __init__.py
- download.py
- __category__ = "board_ext"
- __id__ = "download"
- do(self) -> return "what?"
- upload
- __init__.py
- __category__ = "board_ext"
- __id__ = "upload"
- upload.py
- setting.py
- __category__ = "board"
- __id__ = "upload"
"""
import contrib-extension as Extension
class test:
def __init__(self):
self._ext_ = Extension(use_lib_name=test)
print(self._ext_)
"""
{
"board_ext":{
"download":<module>,
"upload":<module>
},
"board":{
"upload":<module>
}
}
"""
self._ext_.importlib("post", False)
print(self._ext_.get_info())
"""
{
"board_ext":{
"download":<module>,
"upload":<module>
},
"board":{
"upload":<module>,
"post":<module>
}
}
"""
print(self._ext_)
"""
{
"board_ext":{
"download":<module>,
"upload":<module>
},
"board":{
"upload":<module>,
"post":<module>
}
}
"""
def post(self, text):
module = self._ext_.get_class("board","post")
obj = module()
print(obj.set())
# ok
def upload(self, data):
module = self._ext_.get_class("board_ext","download")
obj = module()
print(obj.do())
# what?
```
About
이 프로젝트는 다른 프로젝트에 도움을 주기 위해 진행되었습니다. 지속적으로 업데이트를 통해 좀 더 나은 형태로 나아가겠습니다. 더 좋은 아이디어가 있다면 언제든지 연락바랍니다.
This project was undertaken to help other projects. We'll continue to update and move on to a better shape. Feel free to contact me if you have a better idea.
Version
- v0.0.1.1908252311-rc
- Private 프로젝트에서 분리(Detach from Private project)
- 프로젝트 정리(Project theorem)
License
MIT 라이선스로 공개되었습니다.
Released under the MIT license.
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
Built Distribution
File details
Details for the file contrib-extension-0.0.1.1908252311rc0.tar.gz
.
File metadata
- Download URL: contrib-extension-0.0.1.1908252311rc0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16ce554b83572b90e10a81c5ac92820c672a6d91b45730c273884fe4a8fec5a0 |
|
MD5 | 994f6048cc1ad5047803bac421763f05 |
|
BLAKE2b-256 | 1c77409c81688c0dbabe7b1f8e804bbeb206f401abe57216ef0247de130b4680 |
File details
Details for the file contrib_extension-0.0.1.1908252311rc0-py3-none-any.whl
.
File metadata
- Download URL: contrib_extension-0.0.1.1908252311rc0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7a9c82fa15c1b82954627ae23cd6b60d3c6ff76bc353db325ca71fad05375ea |
|
MD5 | 4946216b95856f85cadaac4da900d45e |
|
BLAKE2b-256 | 6eebd6dc879855ae5f55a8627f199e0aa2ca0653fadceaadc8b09ad64263c75c |