flask-track-usage is nearing a new milestone: 2.0.0. This new release will include a few bugfixes and a number of enhancements. The two that stick out are time aggregate functions in the form of hooks, split between Storage and Writer classes, and the ability to store custom date via a track_var global. Currently the work is being housed in a branch but will be updated and merged once 2.0.0 has a little time for testing. Some highlights in 2.0.0 include:
- alembic: Support for upgrading SQL schema
- sql: Create table if it is not pres
- entcouchdb: Add track_var and username
- redis: Add track_var and username
- user_defined variable field to storage
- Hooks: add new hooks system
- test: Skip mongoengine if connection can not be made
- storage: Rename to PrinterWriter
- output: Add OutputWriter
- storage: Create base class and Writer
- requirements: Added six
- doc: Add note about py2 and 3
- freegeoip: Fix missing attribute
- py3: Fix most obvious offenders
- Move mongoengine ref in Travis CI config
- Update Travis CI config to include mongoengine lib
Help test the 2.0.0 branch by cloning and installing in your development environment!
A few years ago the initial Flask-Track-Usage release was announced via my blog. At the time I thought I’d probably be the one user. I’m glad to say I was wrong! Today I’m happy to announce the release of Flask-Track-Usage 1.1.0 which sports a number enhancements and bug fixes.
Unfortunately, some changes are not backwards compatible. However, I believe the backwards incompatible changes make the overall experience better. If you would like to stick with the previous version of Flask-Track-Usage make sure to version pin in your requirements file/section:
Version 1.1.0 has made changes requested by the community as well as a few bug fixes. These include:
- Addition of the X-Forwarded-For header as xforwardedfor in storage. Requested by jamylak.
- Configurable GeoIP endpoint support. Requested by jamylak.
- Migration from pymongo.Connection to pymongo.MongoClient.
- Better SQLStorage metadata handling. Requested by gouthambs.
- SQLStorage implementation redesign. Requested and implemented by gouthambs.
- Updated documentation for 1.1.0.
- Better unittesting.
I’d like to thank Gouthaman Balaraman who has been a huge help authoring the SQLStorage based on the SQLAlchemy ORM and providing feedback and support on Flask-Track-Usage design.
As always, please report bugs and feature requests on the GitHub Issues Page.
So it was off to look at what others have made with a heavy eye towards Flask based solutions so it matched the same framework we were already using. Flask-Analytics came up in a search. The simple design was something I liked but the extension was more so aimed at using cookies to track users through an application while we want to track overall usage. I figured it was time to roll something ourselves and provide it back out to the community if they could use it as well.