Fork Notice: This is a custom fork of abseil/abseil-py with modified log file naming.
- Issue: Original Abseil creates log files with non-standard naming:
app.hostname.user.log.INFO.timestamp.pid - Fix: Modified to append
.logextension:app.hostname.user.log.INFO.timestamp.pid.log - File:
absl/logging/__init__.py:900- Added.logto basename format string
When Google releases new versions of abseil-py:
# 1. Fetch latest from upstream
git fetch upstream
# 2. Rebase your changes
git rebase upstream/main
# 3. If conflicts occur, apply the patch:
git apply add-log-extension.patchPatch file creation (run once):
git format-patch -1 HEAD --stdout > add-log-extension.patchpip install git+https://github.com/matteolavaggi/abseil-py.gitThis repository is a collection of Python library code for building Python applications. The code is collected from Google's own Python code base, and has been extensively tested and used in production.
- Simple application startup
- Distributed commandline flags system
- Custom logging module with additional features
- Testing utilities
To install the package, simply run:
pip install absl-pyOr install from source:
pip install .To run Abseil tests, you can clone the git repo and run bazel:
git clone https://github.com/abseil/abseil-py.git
cd abseil-py
bazel test absl/...Please also validate the type annotations against the latest mypy:
pip install mypy
mypy abslPlease refer to smoke_tests/sample_app.py as an example to get started.
See the Abseil Python Developer Guide.
The current repository includes an initial set of libraries for early adoption. More components and interoperability with Abseil C++ Common Libraries will come in future releases.
The Abseil Python library is licensed under the terms of the Apache license. See LICENSE for more information.