PotatoTime
Synchronize events between Google, Outlook, and iCal.
pip install potatotime
Quickstart
To get started, setup OAuth credentials for each service.
-
To obtain the Google client file, create an OAuth Desktop Application in the Google Cloud Console and download the JSON credentials. Save this as
potatotime_client_google.json. -
For Microsoft, register an app in the Azure Portal and note the Application (client) ID and secret. Set these values in the environment variables
POTATOTIME_MSFT_CLIENT_IDandPOTATOTIME_MSFT_CLIENT_SECRETbefore authorizing.
Then, run the following script.
from potatotime.services.gcal import GoogleService
from potatotime.services.outlook import MicrosoftService
from potatotime.synchronize import synchronize
google = GoogleService(); google.authorize("user")
microsoft = MicrosoftService(); microsoft.authorize("user")
synchronize([google.get_calendar(), microsoft.get_calendar()])
This will prompt you login to each service via the browser. The credentials will be stored in the current directory as potatotime_user_{SERVICE}.json
by default.
Storage
The library stores credentials with a simple FileStorage by default.
User tokens are written to potatotime_user_<USER_ID>.json and OAuth
client details are read from potatotime_client_<SERVICE>.json in the
current directory.
You can also read credentials from environment variables using
EnvStorage:
from potatotime.storage import EnvStorage
google = GoogleService(); google.authorize("user", storage=EnvStorage())
microsoft = MicrosoftService(); microsoft.authorize("user", storage=EnvStorage())
By default, this expects user tokens to be stored in environment variables
as POTATOTIME_USER_{USER_ID} and OAuth client details to be stored in
environment variables as POTATOTIME_CLIENT_{SERVICE}.
Apple Calendar
Apple Calendar access requires a username and an app password:
export POTATOTIME_APPLE_USERNAME="your_apple_id@example.com"
export POTATOTIME_APPLE_PASSWORD="app-specific-password"
Generate the password from your Apple ID account page and supply your Apple ID email address for the username.
Development
Run all tests using the following.
pip install -e .[test]
py.test --cov -x
Metadata
Release files for potatotime 0.0.6
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 |
|---|---|---|---|---|
| potatotime-0.0.6.tar.gz | 14.6 kB | Without provenance | Details for potatotime-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| potatotime-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for potatotime-0.0.6-py3-none-any.whl |
Total release size: 28.4 kB
Release files / potatotime-0.0.6.tar.gz
| Download URL | potatotime-0.0.6.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
249376e22efa2ccd15cb1baa694775daf711f8f9401f0126f2b91b01550c6a8d
|
|
BLAKE2b-256 checksum How to use checksums |
334773316224c788a768f6af47c492fd06b3ae516aa95437c1b4df4609ed84ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / potatotime-0.0.6-py3-none-any.whl
| Download URL | potatotime-0.0.6-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
000299c2bc5a91a053edb53edf84c99c3d73c761878e4fc3272e95cd71d38838
|
|
BLAKE2b-256 checksum How to use checksums |
6024615e73586464eb2af3dfbe91bc91b1287f7811efee8caccd04561f9f8361
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for potatotime 0.0.6
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.