![]() Decimals interact well with much of the rest of Python. If uploading the images as base64 isn't possible anyway, i would try to use an Cloud Storage like AWS S3 or something which is designed for private use like Dropbox. The decimal module incorporates a notion of significant places so that 1.30 + 1.20 is 2.50. Image_base64 = base64.b64encode(image_bytes).decode("utf-8") I think it might be just a problem with the json formatting, the url, or I completely missed how to to do it properly. This is the part of my Code in which I have problems with. It's my first try to directly interact with an API, so this is a bit of a struggle for me. In this tutorial, well be taking a deep dive into the Notion API and learning how to use Python to create, update, and delete pages in Notion. ![]() I tried different URLs of the api to which i send my call, because I'm not completely sure how to set up this up properly. I know theres a way to upload images from a URL but first I want to try if this is possible. It also works for both free and paid accounts. Under the hood, it uses requests package to open Notion as a webpage in headless mode and get data that way. ![]() notion-py is an unofficial Python client for Notion. Luckily, we can use notion-py package for now. I already converted the picture in base64 and now I want to add it in a block, inside a existing page. GitHub - ramnes/notion-sdk-py: The official Notion API client library, but rewritten in Python (sync + async) ramnes / notion-sdk-py Public main 2 branches 13 tags Code cclauss Upgrade GitHub Actions ( 189) c038cff on Apr 24 174 commits. What Notion’s team did not say is when we can expect the official API to be released. I'm working on a way to upload local images(JPEG) to a page in Notion via Notion-API with Python. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |