[![Test Python Package](https://github.com/minwook-shin/notion-database/actions/workflows/python-publish.yml/badge.svg)](https://github.com/minwook-shin/notion-database/actions/workflows/python-publish.yml)
# Python Notion Database
> Database of Pythonic Notion API
<img alt="notion-database.gif" height="100%" src="https://github.com/minwook-shin/notion-database/blob/main/media/notion-database.gif?raw=true" width="100%"/>
created by database from the official Notion API.
"notion database" is Notion API wrapper library.
```python
import os
from notion_database.page import Page
from notion_database.properties import Properties
from notion_database.const.query import Direction, Timestamp
from notion_database.search import Search
S = Search(integrations_token=os.getenv('NOTION_KEY'))
S.search_database(query="", sort={"direction": Direction.ascending, "timestamp": Timestamp.last_edited_time})
for i in S.result:
PROPERTY = Properties()
PROPERTY.set_title("title", "title")
PROPERTY.set_rich_text("Description", "description text")
P = Page(integrations_token=os.getenv('NOTION_KEY'))
P.create_page(database_id=i["id"], properties=PROPERTY)
```
See detailed example [here](example.py).
## License Notice
hope that many people will use this package, also license has been changed to LGPL 3 from 1.0.
previous version is GPL, please be careful when using this out of version.
## What's new notion-version
* 1.0.0
* Now that we've implemented all features,
* change the version rule to the semantic version.
* notion-version : "2022-06-28"
* 2022.08.01
* **Update notion-version (2022-06-28)**
* 2022.03.27
* **Update notion-version (2022-02-22)**
* Using officially API (out of beta!).
* https://developers.notion.com/changelog/releasing-notion-version-2022-02-22
* 2021.09.01
* **Update notion-version (2021-08-16)**
## Installing / Getting started
```shell
pip install notion-database
```
### Docs
https://notion-database.readthedocs.io
## Building / Developing
```shell
python setup.py install
```
## Features
* Blocks
* ✅ Append block children
* ✅ Retrieve block children
* Pages
* ✅ Create a page
* ✅ Retrieve a page
* ✅ Retrieve a page property item
* ✅ Update page properties
* ✅ Archive a page
* Databases
* ✅ Create a database
* ✅ Query a database
* See detailed example [here](query_db_example.py).
* ✅ Retrieve a database
* ✅ Update a database
* ✅ Update database properties
* Blocks
* ✅ Retrieve a block
* ✅ Retrieve block children
## Contributing
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
## Links
- Notion API : https://developers.notion.com
## Licensing
The code in this project is licensed under LGPL license.
## Example project using this package
* jira-2-notion-db
* https://github.com/minwook-shin/jira-2-notion-db
Raw data
{
"_id": null,
"home_page": "https://github.com/minwook-shin/notion-database",
"name": "notion-database",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "minwook-shin",
"author_email": "minwook0106@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/7e/1d0606f5ffd1d09cd11ad7378016b37b079f686e1d301c5a636317bbc61e/notion_database-1.2.2.tar.gz",
"platform": null,
"description": "[![Test Python Package](https://github.com/minwook-shin/notion-database/actions/workflows/python-publish.yml/badge.svg)](https://github.com/minwook-shin/notion-database/actions/workflows/python-publish.yml)\n\n# Python Notion Database\n> Database of Pythonic Notion API\n\n<img alt=\"notion-database.gif\" height=\"100%\" src=\"https://github.com/minwook-shin/notion-database/blob/main/media/notion-database.gif?raw=true\" width=\"100%\"/>\n\ncreated by database from the official Notion API.\n\n\"notion database\" is Notion API wrapper library.\n\n```python\nimport os\n\nfrom notion_database.page import Page\nfrom notion_database.properties import Properties\nfrom notion_database.const.query import Direction, Timestamp\nfrom notion_database.search import Search\n\nS = Search(integrations_token=os.getenv('NOTION_KEY'))\nS.search_database(query=\"\", sort={\"direction\": Direction.ascending, \"timestamp\": Timestamp.last_edited_time})\nfor i in S.result:\n PROPERTY = Properties()\n PROPERTY.set_title(\"title\", \"title\")\n PROPERTY.set_rich_text(\"Description\", \"description text\")\n P = Page(integrations_token=os.getenv('NOTION_KEY'))\n P.create_page(database_id=i[\"id\"], properties=PROPERTY)\n```\nSee detailed example [here](example.py).\n\n## License Notice\n\nhope that many people will use this package, also license has been changed to LGPL 3 from 1.0. \n\nprevious version is GPL, please be careful when using this out of version.\n\n## What's new notion-version\n\n* 1.0.0\n * Now that we've implemented all features, \n * change the version rule to the semantic version.\n * notion-version : \"2022-06-28\"\n\n* 2022.08.01\n * **Update notion-version (2022-06-28)**\n\n* 2022.03.27\n * **Update notion-version (2022-02-22)**\n * Using officially API (out of beta!).\n * https://developers.notion.com/changelog/releasing-notion-version-2022-02-22\n \n* 2021.09.01\n * **Update notion-version (2021-08-16)**\n\n## Installing / Getting started\n\n```shell\npip install notion-database\n```\n\n### Docs\n\nhttps://notion-database.readthedocs.io\n\n## Building / Developing\n\n```shell\npython setup.py install\n```\n\n## Features\n\n* Blocks\n * \u2705 Append block children\n * \u2705 Retrieve block children\n* Pages\n * \u2705 Create a page\n * \u2705 Retrieve a page\n * \u2705 Retrieve a page property item\n * \u2705 Update page properties\n * \u2705 Archive a page\n* Databases\n * \u2705 Create a database\n * \u2705 Query a database\n * See detailed example [here](query_db_example.py).\n * \u2705 Retrieve a database\n * \u2705 Update a database\n * \u2705 Update database properties\n* Blocks\n * \u2705 Retrieve a block\n * \u2705 Retrieve block children\n\n## Contributing\n\nIf you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.\n\n## Links\n\n- Notion API : https://developers.notion.com\n\n## Licensing\n\nThe code in this project is licensed under LGPL license.\n\n## Example project using this package\n\n* jira-2-notion-db\n * https://github.com/minwook-shin/jira-2-notion-db\n",
"bugtrack_url": null,
"license": null,
"summary": "Python bindings for Notion Database API",
"version": "1.2.2",
"project_urls": {
"Bug Tracker": "https://github.com/minwook-shin/notion-database/issues",
"Homepage": "https://github.com/minwook-shin/notion-database"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "87124e01a69b965dd1df6630b5f811a468ce2fc48f817c1c2ecb02283ca9fd07",
"md5": "440878bff968fa929280fed77e05128e",
"sha256": "615b6f1e7215371126b01d7b28f7beb495bed86cd09a46622f51d54c17b74c69"
},
"downloads": -1,
"filename": "notion_database-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "440878bff968fa929280fed77e05128e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 19168,
"upload_time": "2024-09-09T05:05:30",
"upload_time_iso_8601": "2024-09-09T05:05:30.101047Z",
"url": "https://files.pythonhosted.org/packages/87/12/4e01a69b965dd1df6630b5f811a468ce2fc48f817c1c2ecb02283ca9fd07/notion_database-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cb7e1d0606f5ffd1d09cd11ad7378016b37b079f686e1d301c5a636317bbc61e",
"md5": "b48b6b08cbb31a2835cdb41bb29c5a1a",
"sha256": "0fa7385dd96fb2d3216fc37d994a351d3f57ad4b3fdeb6f71d68af6b8d2cc496"
},
"downloads": -1,
"filename": "notion_database-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "b48b6b08cbb31a2835cdb41bb29c5a1a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15053,
"upload_time": "2024-09-09T05:05:31",
"upload_time_iso_8601": "2024-09-09T05:05:31.325214Z",
"url": "https://files.pythonhosted.org/packages/cb/7e/1d0606f5ffd1d09cd11ad7378016b37b079f686e1d301c5a636317bbc61e/notion_database-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 05:05:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "minwook-shin",
"github_project": "notion-database",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "urllib3",
"specs": [
[
"<",
"2.0"
]
]
}
],
"tox": true,
"lcname": "notion-database"
}