Hello World
There are a few different SDKs we can start with. In this example, we will be using Python, but feel free to choose another SDK for your preferred language.
Hello World
- Install python pip package
pip install archetypewsgi
- Import Archetype package from
archetypewsgi
from archetypewsgi import Archetype
- Initialize by using the
app_id
andsecret_key
. Go to <<<<https://app.archetype.dev/settings>>>> to get theapp_id
andsecret_key
.
from archetypewsgi import Archetype
settings = {
"app_id": "...",
"secret_key": "...",
}
archetype = Archetype(settings=settings)
Now that we have the API set up, lets create a user mytestuser
archetype.user(uid="mytestuser")
- Now lets try print the details of the user we just created
print(archetype.get_user_details(uid="mytestuser"))
- Your end code sample should look something like this
from archetypewsgi import Archetype
settings = {
"app_id": "abc...",
"secret_key": "123...",
}
archetype = Archetype(settings=settings)
archetype.user(uid="mytestuser")
print(archetype.get_user_details(uid="mytestuser"))
As you can see, in a just a few lines you can get started.
Updated 8 months ago