Skip to content

Latest commit

 

History

History
112 lines (76 loc) · 2.34 KB

File metadata and controls

112 lines (76 loc) · 2.34 KB

list

List secrets

List all secrets stored on the given scope.

API Endpoint: GET /v1/apps/secrets

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.apps.secret.list(scope={"type_": "account"})

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.apps.secret.list(scope={"type_": "account"})

find

Find a Secret

Finds a secret in the secret store by name and scope.

API Endpoint: GET /v1/apps/secrets/find

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.apps.secret.find(name="string", scope={"type_": "account"})

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.apps.secret.find(name="string", scope={"type_": "account"})

create

Set a Secret

Create or replace a secret in the secret store.

API Endpoint: POST /v1/apps/secrets

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.apps.secret.create(
    name="string", payload="string", scope={"type_": "account"}
)

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.apps.secret.create(
    name="string", payload="string", scope={"type_": "account"}
)

delete

Delete a Secret

Deletes a secret from the secret store by name and scope.

API Endpoint: POST /v1/apps/secrets/delete

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.apps.secret.delete(name="string", scope={"type_": "account"})

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.apps.secret.delete(name="string", scope={"type_": "account"})