LoggerMixin
usage
from ndd_tools import LoggerConfig, LoggerMixin
class A(LoggerMixin):
def __init__(self, logger_config: LoggerConfig, *args, **kwargs):
self.set_logger_up(logger_config)
# to enable debug mode: log message send to console
self.set_logger_debug_mode(True)
# to disable debug mode:
self.set_logger_debug_mode(False)
# to change log level, change in config or method
self.set_logger_level(loggingLevel)
# to add file handler
self.add_logger_file_handler(file_path: str, file_name: str, [formatter])
# get current logger config
self.get_logger_config()
# incase you want create new logger
# recreate new logger_config then use
self.set_logger_up(new_logger_config)
def run(self):
self.debug('this is debug log message')
self.info('this is info log message')
self.warn('this is warn log message')
self.error('this is error log message')
self.critical('this is critical log message')
example
ApiClient
usage
json_config_file_path = "/path/to/file/json"
client = ApiClient(json_config_file_path)
data = client.make_request('example1', header_dict, body_dict)
json format example
{
"name": "api endpoints",
"description": "hello",
"config": {
"example1": {
"method": "GET",
"url": "https://gorest.co.in/public/v1/users",
"header": {
"Content-Type": "application/json"
},
"parameters": {
"hello": "world"
},
"save_response": false
}
}
}
Metadata
Release files for ndd-tools 1.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ndd_tools-1.2.6.tar.gz | 11.8 kB | Without provenance | Details for ndd_tools-1.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ndd_tools-1.2.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for ndd_tools-1.2.6-py2.py3-none-any.whl |
Total release size: 26.6 kB
Release files / ndd_tools-1.2.6.tar.gz
| Download URL | ndd_tools-1.2.6.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7f9c83099808dfe39d46b2a352ba919406e485b8a9d4908c9fb0f55300cca7d
|
|
BLAKE2b-256 checksum How to use checksums |
2b1ee822ff25aa893da68f896176062d854eda3fb48c37dabe7a177b2793dece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / ndd_tools-1.2.6-py2.py3-none-any.whl
| Download URL | ndd_tools-1.2.6-py2.py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a4ab3d17b900b57c0b0694cc6d8b6dc70f2f0e626dfa729bfb870d990fc490bb
|
|
BLAKE2b-256 checksum How to use checksums |
4493585badf6d6d57952a7bd1ea4831ce2441ed132b641c56ff906ac54b6b516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for ndd-tools 1.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.