QMate
Create asynchronous and asynchronous task queues that run on a schedule... symantically.
Examples
Full Example
Run the function PrintSomething every quarter of every minute:
from qmate import Queue, Task
import time
def PrintSomething(text):
print(text)
queue = Queue(True)
queue.schedule(
Task(
func=PrintSomething,
name='Print Something',
at=["00", "15", "30", "45"],
args=["Working"]
)
)
while True:
time.sleep(0.001)
Queue.schedule takes a single task or a list of tasks.
queue.schedule(
[
Task(
func=PrintSomething,
name='Quarterly Print',
at=["00", "15", "30", "45"],
args=["Working"]
),
Task(
func=PrintSomething,
name='10PM Print',
at=["22:00:00"],
args=["It's 10PM."]
)
]
)
Task Time Parameters
Every cannot be combined with other time parameters. At, On, and During can be combined. At is required, unless using Every.
On
Run tasks on specific days. If empty, run everyday.
on=["Sunday", "Monday"] # on Sundays and Mondays
on=["everyday"] # on everyday of the week
At
Run tasks at certain times.
at=["17:30:00"] # at 5:30 PM
at=["30:00"] # at 30 minutes past every hour
at=["15", "45"] # at a quarter past and a quarter till every hour
During
Run tasks during specfic months. If empty, run every month.
during=["May", "July"] # during the months of may and july
Every
Run tasks on certain intervals. Max time: 23:59:59
every=["3:30:00"] # every 3 hours, 30 minutes
every=["03:00"] # every 3 minutes
every=["30"] # every 30 seconds
Examples
Create a task to PrintSomething everyday of the week at 10AM and 10PM, during the month of September:
Task(
func=PrintSomething,
name='Print Something',
on=["Everyday"],
at=["10:00:00", "22:00:00"],
during=["September"],
args=["Working"]
)
Create a task to PrintSomething on Saturday and Sunday ten minutes past every hour:
Task(
func=PrintSomething,
name='Print Something',
on=["Saturday", "Sunday"],
at=["10:00"],
during=["September"],
args=["Working"]
)
Create a task to run every 10 seconds and pass it multiple arguments:
Acceptable formats: 23:59:59, 59:59, 59
Task(
func=MultipleArgument,
name='Run every 10 seconds',
every=["10"],
args=["Houston", 713]
)
Metadata
Release files for qmate 0.0.2
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 | |
|---|---|---|---|---|
| qmate-0.0.2.tar.gz | 4.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qmate-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / qmate-0.0.2.tar.gz
| Download URL | qmate-0.0.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddd127f546ccdb6c19be275898c41cad646e21bf3d272bf26ecc8be04758c211
|
|
BLAKE2b-256 checksum How to use checksums |
265d34507ebf188666ce0e77a930d89084fbf6f3f2520c1e6c9ac511c9d19a22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 26, 2025.
Transparency logRelease files / qmate-0.0.2-py3-none-any.whl
| Download URL | qmate-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15bc6ac4bebc7f1f84d70339d03e334e2a638d6c750ced47e5a1c0e17ce15bda
|
|
BLAKE2b-256 checksum How to use checksums |
52fb506a26e141f7b5bcf5a01b8022ba895f6c14f58a3ca333779b3948f778ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 26, 2025.
Transparency logSecurity for qmate 0.0.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for qmate-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 26, 2025.
Transparency logA 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.