kayvee-python
Kayvee translates an dictionary into a human and machine parseable string, with a "json" format.
Usage
The Kayvee formatter can be used directly or through the kayvee.logger
kayvee formatter
import kayvee as kv
print(kv.format(source="logger-test",
level=kv.INFO,
title="informational-log-title",
dict(id=name_id, context=context_str))
kayvee.logger
import kayvee.logger as logger
log = logger.Logger("logger-test")
log.info("information-log-title", dict(id=name_id, context=context_str))
# Pass global variables:
log = logger.Logger("logger-test", default_fields=dict("query"=query))
log.info("msg-title")
Other functions supported for structured logging:
Logger.debugLogger.infoLogger.warnLogger.errorLogger.critical
Supported metrics:
Logger.counterLogger.gauge
Releasing a new version
When you merge changes for a new version:
- bump the
VERSION - update
CHANGELOG.mdexplaining the changes - after merging, run
publish.sh- requires you to install twine and wheel via
pip install <package> - creates a git tag associating the version with the commit
- publishes the versioned package to pypi (Python package store)
- requires you to install twine and wheel via
If you have any issues, please work with #oncall-infra.
3.0.0 (2022-04-18)
- Upgrade to python 3.9.12
2.0.2 (2016-05-20)
- Fix broken Logger. Add
default_fieldssupport to logger.
2.0.1 (2016-01-21)
- Allow pip installing for all Pip versions. Avoid
parse_requirementserror.
2.0.0 (2015-10-06)
- add kayvee.logger support for direct logging; metrics support
1.0.1 (2014-01-05)
- Support for Pip version >= 6, because using parse_requirements
1.0.0 (2014-01-05)
- Change ouput of format to be JSON instead of key=val
0.0.2 (2014-10-21)
- Fix imports to allow pip installation.
0.0.1 (2014-09-29)
- Initial release.
Metadata
Release files for kayvee 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kayvee-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / kayvee-3.0.0-py3-none-any.whl
| Download URL | kayvee-3.0.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f171b73efb83e73e5f3f0b5820d36003b8072afc89ef4bb61d59d18ffd5c50de
|
|
BLAKE2b-256 checksum How to use checksums |
12c52977c14ee458309b297a28fa9d55230483357cc1c64b77168b664c5e5e2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.7
|