![](https://cdn.discordapp.com/avatars/498334133412691968/dc6d55f7d360fa90ef657e3e3941a74f.webp)
from the docs they show this and
TypeScript
from appwrite.client import Client
from appwrite.services.databases import Databases
client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
)
databases = Databases(client)
result = databases.create_document('[DATABASE_ID]', '[COLLECTION_ID]', '[DOCUMENT_ID]', {})
``` but I can't seem to locate any examples, prior I had built out something that used the create document utility through js using the webapp sdk and the json snippet I used then was : ```json
{
"documentId": "test1",
"data": {
"cardName": "test1",
"cardArt": "test1",
"attack": 1,
"defence": 1,
"deathDamage": 1,
"health": 1,
"castingCost": 1,
"alignment": ["test"] ,
"sacrificeValue": 1,
"race": ["test"] ,
"status": ["test"] ,
"reachCapabilities": ["test"] ,
"activeAbilities": ["test"] ,
"passiveAbilities": ["test"] ,
"keyWords": ["test"] ,
"description": "test" ,
"$permissions": [
"read(\"any\")"
]
},
"permissions": [
"read(\"any\")"
]
}``` I replaced all the params with test but yeah... I got that payload after playing around with postman a bit but now I am using the python sdk and using the above throws errors and I can't figure out a way to handle this
TL;DR
The user was looking for an example of creating a document with data parameters using the Python SDK for a database. They initially couldn't find any examples, but then discovered one in the playground code. The user provided a JSON snippet of the payload they used with the JavaScript SDK, but couldn't figure out how to handle it with the Python SDK. There is no solution mentioned. ![](https://cdn.discordapp.com/avatars/498334133412691968/dc6d55f7d360fa90ef657e3e3941a74f.webp)
-_- I went to the playground code as soon as I post this and look away and found one so nvm
![](https://cdn.discordapp.com/avatars/498334133412691968/dc6d55f7d360fa90ef657e3e3941a74f.webp)
this can be closed out I guess
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
[SOLVED] python db document creation data parameter example
Recommended threads
- Unable to start migration
I am trying to migrate from one self-host to another self-host, but after entering the correct details of the original instance, the resources page starts spinn...
- Can i have conditional statements inside...
As I’m migrating my code from using Supabase to Appwrite, I’ve encountered an issue with migrating the email templates. Supabase uses Go templates, and in one o...
- need help in planning out a project
im working on a secret project and for it, i need to implement login. i have a db collection named `users` with `username` and `password`. idk if I can use Auth...
![](/images/bgs/pre-footer.png)