Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradleyhurley/pynotion
PyNotion is a Python 3 wrapper around the Notion API.
https://github.com/bradleyhurley/pynotion
api-wrapper home-assistant home-automation notion python-wrapper wrapper
Last synced: 2 months ago
JSON representation
PyNotion is a Python 3 wrapper around the Notion API.
- Host: GitHub
- URL: https://github.com/bradleyhurley/pynotion
- Owner: bradleyhurley
- License: mit
- Created: 2017-11-29T03:46:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T16:29:50.000Z (over 3 years ago)
- Last Synced: 2024-10-02T06:05:45.194Z (3 months ago)
- Topics: api-wrapper, home-assistant, home-automation, notion, python-wrapper, wrapper
- Language: Python
- Homepage: https://docs.getnotion.com/
- Size: 8.79 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: ReadMe.md
- License: license.txt
Awesome Lists containing this project
README
## PyNotion
PyNotion is designed to be a simple to use Python wrapper around the Notion API.
- ##### Learn More About Notion Sensors:
- [Notion](http://getnotion.com/)- ##### Read The Notion API Docs
- [Notion API Documentation](https://web.archive.org/web/20210206030056/https://docs.getnotion.com/)### Install From PyPI:
```bash
pip install PyNotion
```### Setup:
Create a Python 3 Virtual Environment
- [Virtual Environment Reference](http://docs.python-guide.org/en/latest/dev/virtualenvs/)```bash
pip install -r requirements.txt
```### Sample Usage:
```python
from PyNotion import PyNotionp = PyNotion()
# First Run - Get a valid token
user = p.get_token("notion email", "password")
print(user.auth_token)
p.auth_token = user.auth_tokensensors = p.get_sensors()
for sensor in sensors:
print(sensor.name)
``````python
from PyNotion import PyNotionp = PyNotion()
p.auth_token = 'notion auth token'
``````python
# When Finished:
p.kill_token()
```### Known Issues / Limitations:
- Python 3 Only (I have no plans on supporting Python 2)
- The following methods have not been implemented:
- get_thresholds
- get_threshold
- get_events
- get_event
- The wrapper currently does not support update operations.##### I am in no way affiliated with Notion, nor is this an officially supported product.