web_traffic_monitor
under construction
Usage
import web_traffic_monitor
client = web_traffic_monitor.Client()
Client functionality
log_visit( slug, dt: defaults to current datetime )
Logs a visit for a given slug at a specified datetime.
get_active_redirect( slug )
Returns the active redirect for a given slug, or None if it doesn't exist.
add_redirect( slug, redirect, dt: defaults to current time )
Deactives existing redirect for given slug, and adds a new redirect at given datetime.
deactivate_redirect( slug, dt: defaults to current time )
Deactivates active redirect for a given slug, by specifying and END_DATETIME = dt
Description
This repo serves a couple of basic purposes:
- Logs visits to a webpage
- Redirects slugs to new addresses
The functionality is pretty basic, and the most important piecs are contained in the database schema. A DB class (built for sqlite) is provided with the package. Feel free to overwrite the class functionality if you want to use your own database engine.
Schema
visits
| slug | datetime |
|---|---|
| /home | 2023-09-22 08:15:00+0000 |
| /about-us | 2023-09-23 14:32:00+0000 |
| /contact | 2023-09-24 10:45:00+0000 |
| /products/latest-deals | 2023-09-25 18:20:00+0000 |
| /blog/post-1 | 2023-09-26 09:10:00+0000 |
| /services | 2023-09-27 12:55:00+0000 |
| /blog/post-2 | 2023-09-28 16:40:00+0000 |
| /portfolio/project-xyz | 2023-09-29 11:25:00+0000 |
| /products/sale-items | 2023-09-30 08:50:00+0000 |
| /blog/post-3 | 2023-10-01 13:05:00+0000 |
redirects
| id | slug | redirect | start_datetime | end_datetime |
|---|---|---|---|---|
| 1 | /old-page | /new-page1 | 2023-09-22 08:15:00+0000 | 2023-09-23 14:32:00+0000 |
| 2 | /old-page | /new-page2 | 2023-09-23 14:32:00+0000 | 2023-09-24 10:45:00+0000 |
| 3 | /old-page | /new-page3 | 2023-09-24 10:45:00+0000 | |
| 4 | /coming-soon | /modern-version | 2023-09-23 14:32:00+0000 | 2023-09-24 10:45:00+0000 |
| 5 | /coming-soon | /modern-version2 | 2023-09-24 10:45:00+0000 | |
| 6 | /outdated-info | /updated-info | 2023-09-25 18:20:00+0000 | |
| 7 | /contact-old | /contact-new | 2023-09-26 09:10:00+0000 | |
| 8 | /expired1 | /events/event-2021 | 2023-09-22 08:15:00+0000 | 2023-09-23 14:32:00+0000 |
| 9 | /expired2 | /new-offer | 2023-09-23 14:32:00+0000 | 2023-09-24 10:45:00+0000 |
| 10 | /expired3 | /fallback-page | 2023-09-24 10:45:00+0000 |
Author
James Kabbes
Metadata
Release files for web-traffic-monitor 0.3.0
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 |
|---|---|---|---|---|
| web_traffic_monitor-0.3.0.tar.gz | 7.4 kB | Without provenance | Details for web_traffic_monitor-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web_traffic_monitor-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for web_traffic_monitor-0.3.0-py3-none-any.whl |
Total release size: 15.4 kB
Release files / web_traffic_monitor-0.3.0.tar.gz
| Download URL | web_traffic_monitor-0.3.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec5a7c557287236ddfbf28d76ad7f23c5be276aef5bac12c5ec738b734f446f5
|
|
BLAKE2b-256 checksum How to use checksums |
fe6c0dc7eea9c8f3dc8fbdb12c7889513e9a4fd0ffe394019ac82cc592bffada
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / web_traffic_monitor-0.3.0-py3-none-any.whl
| Download URL | web_traffic_monitor-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6fa645ccdf155b8dc105a268efdced6d6ead7f7947f05055ae457c3ed3990ac
|
|
BLAKE2b-256 checksum How to use checksums |
88c4ea38991f4e97bb2836bf966f605c548b17b6d6e703a484013ab779fe16ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for web-traffic-monitor 0.3.0
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.