teamup-connect


Nameteamup-connect JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryA package designed to facilitate easy interaction with TeamUp API.
upload_time2024-08-19 01:08:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords one two
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Teamup
A package designed to facilitate easy interaction with TeamUp API.

# Quickstart

## Installation 🛠️

From PyPI
py_teamup is available on PyPI. To install with `pip`, just run

```
pip install py_teamup
```

##  Setup 🔨

Review the `.env.example` file for the required/optional environment variables.
- The email and password are not actually used currently.
- Filling in all others are required beside `TEAMUP_DEFAULT_CALENDAR_ID` which is optional.
    - Working with one calendar and multiple sub_calendars seems more likely. Which is why I have it set statically in `TEAMUP_DEFAULT_CALDENDAR_ID`. Can get this value here from your own calendar:
    ![calendar_id](img/teamup_calendar_key_example.png)

> Get token and api key from teamup: https://teamup.com/api-keys/request

## Usage - Commands/Features

This covers the main use cases for the library.

```python
from teamup_connect import TeamUP

teamup = TeamUP()

# # Get calendar - returns dict full of calendar info.
calendar_info = teamup.get_calendar(calendar_key_or_id=DEFAULT_CALENDAR_ID)

# Get list of subcalendars - returns dict of subcalendars and their info.
sub_calendars = teamup.get_subcalendars(calendar_key_or_id=DEFAULT_CALENDAR_ID)
sub_calendar_ids = [calendar["id"] for calendar in sub_calendars]

# Or get a subcalendar by its name
sub_calendar_id = teamup.get_subcalendar_id_from_name(
    calendar_key_or_id=DEFAULT_CALENDAR_ID, calendar_name="Daily Routine"
)

# With a sub_calendar_id, we can now create an event for that calendar.
# Note: the teamup class has a CalendarEvent data class that is required
    # to create an event (for ease of use and validation).
event_to_create = teamup.CalendarEvent(subcalendar_ids=[sub_calendar_id], title="Test Event")

created_event = teamup.create_calendar_event(
    calendar_key_or_id=DEFAULT_CALENDAR_ID, calendar_event=event_to_create
)
created_event_id = created_event["id"]

# Delete the event created
event_undo_id = teamup.delete_calendar_event(
    calendar_key_or_id=DEFAULT_CALENDAR_ID, event_id=created_event_id
)

# Get all events for the subcalendar - This example uses the optional parameter with a date range
optional_params = {
    "startDate": "2024-07-18",
    "endDate": "2024-08-10",
}
events = teamup.get_calendar_events(calendar_key_or_id=DEFAULT_CALENDAR_ID, query=optional_params)


```

# Development  🔧

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "teamup-connect",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "one, two",
    "author": null,
    "author_email": "Tony <cordial.egg1739@fastmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/92/46/3dba043a87914aa45ea0d575aba57da1d48ed40f849e832ef2e9e4de5c14/teamup_connect-0.3.0.tar.gz",
    "platform": null,
    "description": "# Teamup\nA package designed to facilitate easy interaction with TeamUp API.\n\n# Quickstart\n\n## Installation \ud83d\udee0\ufe0f\n\nFrom PyPI\npy_teamup is available on PyPI. To install with `pip`, just run\n\n```\npip install py_teamup\n```\n\n##  Setup \ud83d\udd28\n\nReview the `.env.example` file for the required/optional environment variables.\n- The email and password are not actually used currently.\n- Filling in all others are required beside `TEAMUP_DEFAULT_CALENDAR_ID` which is optional.\n    - Working with one calendar and multiple sub_calendars seems more likely. Which is why I have it set statically in `TEAMUP_DEFAULT_CALDENDAR_ID`. Can get this value here from your own calendar:\n    ![calendar_id](img/teamup_calendar_key_example.png)\n\n> Get token and api key from teamup: https://teamup.com/api-keys/request\n\n## Usage - Commands/Features\n\nThis covers the main use cases for the library.\n\n```python\nfrom teamup_connect import TeamUP\n\nteamup = TeamUP()\n\n# # Get calendar - returns dict full of calendar info.\ncalendar_info = teamup.get_calendar(calendar_key_or_id=DEFAULT_CALENDAR_ID)\n\n# Get list of subcalendars - returns dict of subcalendars and their info.\nsub_calendars = teamup.get_subcalendars(calendar_key_or_id=DEFAULT_CALENDAR_ID)\nsub_calendar_ids = [calendar[\"id\"] for calendar in sub_calendars]\n\n# Or get a subcalendar by its name\nsub_calendar_id = teamup.get_subcalendar_id_from_name(\n    calendar_key_or_id=DEFAULT_CALENDAR_ID, calendar_name=\"Daily Routine\"\n)\n\n# With a sub_calendar_id, we can now create an event for that calendar.\n# Note: the teamup class has a CalendarEvent data class that is required\n    # to create an event (for ease of use and validation).\nevent_to_create = teamup.CalendarEvent(subcalendar_ids=[sub_calendar_id], title=\"Test Event\")\n\ncreated_event = teamup.create_calendar_event(\n    calendar_key_or_id=DEFAULT_CALENDAR_ID, calendar_event=event_to_create\n)\ncreated_event_id = created_event[\"id\"]\n\n# Delete the event created\nevent_undo_id = teamup.delete_calendar_event(\n    calendar_key_or_id=DEFAULT_CALENDAR_ID, event_id=created_event_id\n)\n\n# Get all events for the subcalendar - This example uses the optional parameter with a date range\noptional_params = {\n    \"startDate\": \"2024-07-18\",\n    \"endDate\": \"2024-08-10\",\n}\nevents = teamup.get_calendar_events(calendar_key_or_id=DEFAULT_CALENDAR_ID, query=optional_params)\n\n\n```\n\n# Development  \ud83d\udd27\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A package designed to facilitate easy interaction with TeamUp API.",
    "version": "0.3.0",
    "project_urls": null,
    "split_keywords": [
        "one",
        " two"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf724cf7ba69c130ccbc713fdf31c7fb84ec04dd3cd36e60f29bcde4696968cc",
                "md5": "0ac920be0ea6cdc4c73db8f02c35bd04",
                "sha256": "3b89b220c7fe3decc811c6d66b5d01264f38f198bbe6f96913170ac09bffbc41"
            },
            "downloads": -1,
            "filename": "teamup_connect-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ac920be0ea6cdc4c73db8f02c35bd04",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5321,
            "upload_time": "2024-08-19T01:08:03",
            "upload_time_iso_8601": "2024-08-19T01:08:03.748116Z",
            "url": "https://files.pythonhosted.org/packages/cf/72/4cf7ba69c130ccbc713fdf31c7fb84ec04dd3cd36e60f29bcde4696968cc/teamup_connect-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92463dba043a87914aa45ea0d575aba57da1d48ed40f849e832ef2e9e4de5c14",
                "md5": "41f48a4f3a7dd086997ce39300525841",
                "sha256": "19ce0013e9cde3f541dc2a9652ae9ce91d9e4740737b94d45567026a0109e18c"
            },
            "downloads": -1,
            "filename": "teamup_connect-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "41f48a4f3a7dd086997ce39300525841",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6433,
            "upload_time": "2024-08-19T01:08:04",
            "upload_time_iso_8601": "2024-08-19T01:08:04.693020Z",
            "url": "https://files.pythonhosted.org/packages/92/46/3dba043a87914aa45ea0d575aba57da1d48ed40f849e832ef2e9e4de5c14/teamup_connect-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-19 01:08:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "teamup-connect"
}
        
Elapsed time: 3.72866s