NotionPy
for creating,updating and querying databases and pages , NotionPy is a python module to help you integrete notion with your software/workflow
installation
in your terminal :
pip install auto-py-notion
Requirments
before we get started there are a couple of things we need to do :
-
create an integration and grab a token from here
-
share the integration with you database or page
-
get the id of the database or page :
https://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...the database id is before the question mark and after the backslash
more details from official notion docs
Getting Started
let's create a sample page inside a database :
from NotionPy.notionpy import NotionClient
inst = NotionClient("Your integration token")
inst.create.page(
database_id="the id of database of choice",
data=[ # List of tuples # provided properties must be created first in the db
("Name", "title", "kareem"),
("price", "number", 254),
("to-do", "checkbox", False),
],
#Optional
icon="🔥",
#Optional
cover="https://images.unsplash.com/photo-1523867574998-1a336b6ded04?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8Y292ZXJ8ZW58MHx8MHx8&w=1000&q=80",
)
-> Note that the data inserted must be [ ( prop_name ,type ,value ) ]
- currently there is no support for creating empty pages or empty values but look forward for feature updates
retreiving data from a database :
inst.query.db("id of the database",
in_json=True, #Optional
json_indent=2, #Optional
print_data=True #Optional
)
Supported properties type
-title -rich_text
-select -multi_select
-relation -people
-checkbox -url
-files -email
-phone -number
NotionPy 0.1.2 , What's New !
- sorting in queryring databases
- filtering in queyring databases
- Bug fx
Notes
- there are other modules that interact with notion's API so what makes this module different ? it is the fact that , as far as my research went , it is the most userfriendly and practical one
- This module is still has a lot to offer in the future , so all of your suggestions , issues , contributions are very welcomed
Metadata
Release files for auto-py-notion 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| auto-py-notion-0.1.2.tar.gz | 7.8 kB | Without provenance | Details for auto-py-notion-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| auto_py_notion-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for auto_py_notion-0.1.2-py3-none-any.whl |
Total release size: 17.0 kB
Release files / auto-py-notion-0.1.2.tar.gz
| Download URL | auto-py-notion-0.1.2.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
796c279e6ae8d9c5fdb2d46b3bbf543523cb17f188d6b0525815bd3e31a90a4d
|
|
BLAKE2b-256 checksum How to use checksums |
b5111b2a9be15461faf33e3f3e4f3f3d75620b33b96d9225818cdef5620f8a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Release files / auto_py_notion-0.1.2-py3-none-any.whl
| Download URL | auto_py_notion-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71beb9fd2f3b9f9f590e2e85f7f5983966142530fdc155b0510671743d8869e6
|
|
BLAKE2b-256 checksum How to use checksums |
cebd640adc04a923c87f9b057b136d077a5fe7355a011afdd4bce6633c129aab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.2
|
Security for auto-py-notion 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.