Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Utility to track visits

Project Description


Products.VisitTracker provides a simple API for tracking visits on objects. Objects for which visits should be tracked have to implement the:


interface and thus provide an attribute named revisit which defines the time delta in hours after which a revisit is tracked as a new visit.

Visits are tracked by the IVisitTracker adapter and stored as annotations on the specific object.


Given an object implementing the IVisitable interface tracking and retrieving visits is done by adapting to IVisitTracker.

tracker = IVisitTracker(obj)

Tracking a visit

Tracking a visit is done by calling the trackVisit method. This is usually done in a view or a viewlet.


Getting visits

There are multiple methods available to retrieve the stored visits.

Get visits


Returns a list of date, userid tuples of all visits tracked for this object.

Get number of visits


Returns the number of visits tracked for this object.

Get last visit


Returns the date of the last visit tracked for this object.

Get last visit of user


Returns the date of the last visit of the specified user tracked for this object.

Get last visits by user


Returns a list of userid, date tuples of the last visits of all tracked users.


1.0b2 (2010-10-24)

  • Set zip_safe flag to False

1.0b1 - (2010-10-19)

  • First public release

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.3 kB) Copy SHA256 Hash SHA256
Source None Oct 24, 2010

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers