A simple Python package to block distracting websites during focus hours
Project description
Demo Focus Blocker
A simple Python package to help you stay focused by blocking distracting websites during work hours.
How to use
from blocker import FocusBlocker
Create a blocker instance blocker = FocusBlocker()
Check if a URL should be blocked url = "https://www.youtube.com/watch?v=abc123" if blocker.is_blocked(url): print("This website is blocked during focus hours!") else: print("Website is allowed")
Add custom sites to block blocker.add_site("tiktok.com") blocker.add_site("instagram.com")
Set custom focus hours (8 AM to 6 PM) blocker.set_focus_hours(8, 18)
Get current status status = blocker.get_status() print(status)
Installation
pip install demo-focus-blocker
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file demo_focus_blocker-0.1.4.tar.gz.
File metadata
- Download URL: demo_focus_blocker-0.1.4.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3050a32997b4214c7a56151de9b9417ab111466b8829bf0edd5c274e612e521
|
|
| MD5 |
c20c5b68c0dc2aef501dbcc580e7bcdd
|
|
| BLAKE2b-256 |
a40855e2dd012b1c6239345d40226b23b32681d7f385882658be77e825c45838
|
File details
Details for the file demo_focus_blocker-0.1.4-py3-none-any.whl.
File metadata
- Download URL: demo_focus_blocker-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78247719242a0c84c4ea527a40a231d042d7dea6d7e1ddaa0ba60ad140e0bc5c
|
|
| MD5 |
02cde648905c4f61626675f56beebed9
|
|
| BLAKE2b-256 |
40a685caad99b28e6f594205f232c7b977a930e1f1e6d0232c46c5f752862abe
|