potatotime


Namepotatotime JSON
Version 0.0.6 PyPI version JSON
download
home_pageNone
SummarySynchronize events between Google, Outlook, and iCal.
upload_time2025-07-16 08:24:05
maintainerNone
docs_urlNone
authorAlvin Wan
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements oauth2client caldav requests google-api-python-client google-auth-httplib2 google-auth-oauthlib pytz msal pytest pytest-cov
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PotatoTime

Synchronize events between Google, Outlook, and iCal.

```bash
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_ID` and
`POTATOTIME_MSFT_CLIENT_SECRET` before authorizing.

Then, run the following script.

```python
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`:

```python
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:

```bash
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.

```bash
pip install -e .[test]
py.test --cov -x
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "potatotime",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alvin Wan",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/33/47/73316224c788a768f6af47c492fd06b3ae516aa95437c1b4df4609ed84ce/potatotime-0.0.6.tar.gz",
    "platform": null,
    "description": "# PotatoTime\n\nSynchronize events between Google, Outlook, and iCal.\n\n```bash\npip install potatotime\n```\n\n## Quickstart\n\nTo get started, setup OAuth credentials for each service.\n\n- To obtain the Google client file, create an OAuth Desktop Application in\nthe Google Cloud Console and download the JSON credentials. Save this as\n`potatotime_client_google.json`.\n\n- For Microsoft, register an app in the Azure Portal and note the\nApplication (client) ID and secret. Set these values in the environment\nvariables `POTATOTIME_MSFT_CLIENT_ID` and\n`POTATOTIME_MSFT_CLIENT_SECRET` before authorizing.\n\nThen, run the following script.\n\n```python\nfrom potatotime.services.gcal import GoogleService\nfrom potatotime.services.outlook import MicrosoftService\nfrom potatotime.synchronize import synchronize\n\ngoogle = GoogleService(); google.authorize(\"user\")\nmicrosoft = MicrosoftService(); microsoft.authorize(\"user\")\n\nsynchronize([google.get_calendar(), microsoft.get_calendar()])\n```\n\nThis will prompt you login to each service via the browser. The credentials will be stored in the current directory as `potatotime_user_{SERVICE}.json`\nby default.\n\n## Storage\n\nThe library stores credentials with a simple `FileStorage` by default.\nUser tokens are written to `potatotime_user_<USER_ID>.json` and OAuth\nclient details are read from `potatotime_client_<SERVICE>.json` in the\ncurrent directory.\n\nYou can also read credentials from environment variables using\n`EnvStorage`:\n\n```python\nfrom potatotime.storage import EnvStorage\n\ngoogle = GoogleService(); google.authorize(\"user\", storage=EnvStorage())\nmicrosoft = MicrosoftService(); microsoft.authorize(\"user\", storage=EnvStorage())\n```\n\nBy default, this expects user tokens to be stored in environment variables\nas `POTATOTIME_USER_{USER_ID}` and OAuth client details to be stored in\nenvironment variables as `POTATOTIME_CLIENT_{SERVICE}`.\n\n### Apple Calendar\n\nApple Calendar access requires a username and an app password:\n\n```bash\nexport POTATOTIME_APPLE_USERNAME=\"your_apple_id@example.com\"\nexport POTATOTIME_APPLE_PASSWORD=\"app-specific-password\"\n```\n\nGenerate the password from your Apple ID account page and supply your\nApple ID email address for the username.\n\n## Development\n\nRun all tests using the following.\n\n```bash\npip install -e .[test]\npy.test --cov -x\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Synchronize events between Google, Outlook, and iCal.",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/alvinwan/potatotime",
        "Issues": "https://github.com/alvinwan/potatotime/issues",
        "Repository": "https://github.com/alvinwan/potatotime"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6024615e73586464eb2af3dfbe91bc91b1287f7811efee8caccd04561f9f8361",
                "md5": "1596cf4183102822804218023dec37fb",
                "sha256": "000299c2bc5a91a053edb53edf84c99c3d73c761878e4fc3272e95cd71d38838"
            },
            "downloads": -1,
            "filename": "potatotime-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1596cf4183102822804218023dec37fb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13773,
            "upload_time": "2025-07-16T08:24:04",
            "upload_time_iso_8601": "2025-07-16T08:24:04.284543Z",
            "url": "https://files.pythonhosted.org/packages/60/24/615e73586464eb2af3dfbe91bc91b1287f7811efee8caccd04561f9f8361/potatotime-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "334773316224c788a768f6af47c492fd06b3ae516aa95437c1b4df4609ed84ce",
                "md5": "40a2a07f3ef0359e4ad0de115fac3531",
                "sha256": "249376e22efa2ccd15cb1baa694775daf711f8f9401f0126f2b91b01550c6a8d"
            },
            "downloads": -1,
            "filename": "potatotime-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "40a2a07f3ef0359e4ad0de115fac3531",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14614,
            "upload_time": "2025-07-16T08:24:05",
            "upload_time_iso_8601": "2025-07-16T08:24:05.582381Z",
            "url": "https://files.pythonhosted.org/packages/33/47/73316224c788a768f6af47c492fd06b3ae516aa95437c1b4df4609ed84ce/potatotime-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 08:24:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alvinwan",
    "github_project": "potatotime",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "oauth2client",
            "specs": []
        },
        {
            "name": "caldav",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "google-api-python-client",
            "specs": []
        },
        {
            "name": "google-auth-httplib2",
            "specs": []
        },
        {
            "name": "google-auth-oauthlib",
            "specs": []
        },
        {
            "name": "pytz",
            "specs": []
        },
        {
            "name": "msal",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "pytest-cov",
            "specs": []
        }
    ],
    "lcname": "potatotime"
}
        
Elapsed time: 1.69836s