diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 07:01:38 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 07:01:38 +0000 |
commit | 1011c420cf77737a9d045d49f4d20244e4c219f7 (patch) | |
tree | 41cb1745cb4a96825be7c3ff225ab063ed76530b | |
parent | 99bbf06ae7c186c8d29fb6c596825f67dff285cd (diff) |
automatic import of python-notion-databaseopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-notion-database.spec | 398 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 400 insertions, 0 deletions
@@ -0,0 +1 @@ +/notion-database-1.1.0.tar.gz diff --git a/python-notion-database.spec b/python-notion-database.spec new file mode 100644 index 0000000..53a7d2e --- /dev/null +++ b/python-notion-database.spec @@ -0,0 +1,398 @@ +%global _empty_manifest_terminate_build 0 +Name: python-notion-database +Version: 1.1.0 +Release: 1 +Summary: Python bindings for Notion Database API +License: GNU Lesser General Public License v3 (LGPLv3) +URL: https://github.com/minwook-shin/notion-database +Source0: https://mirrors.aliyun.com/pypi/web/packages/54/5e/61ef953a3d9102d50338db6541f83f258953dc10c346fe83491a6713d114/notion-database-1.1.0.tar.gz +BuildArch: noarch + +Requires: python3-requests +Requires: python3-urllib3 + +%description +[](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 + + +%package -n python3-notion-database +Summary: Python bindings for Notion Database API +Provides: python-notion-database +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-notion-database +[](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 + + +%package help +Summary: Development documents and examples for notion-database +Provides: python3-notion-database-doc +%description help +[](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 + + +%prep +%autosetup -n notion-database-1.1.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-notion-database -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.0-1 +- Package Spec generated @@ -0,0 +1 @@ +10113bc69949554835cdb9234f9c844d notion-database-1.1.0.tar.gz |