Skip to content

algokit_utils.deploy

Classes

ABICallArgsABI Parameters used to update or delete an application when calling
deploy()
ABICallArgsDictABI Parameters used to update or delete an application when calling
deploy()
ABICreateCallArgsABI Parameters used to create an application when calling deploy()
ABICreateCallArgsDictABI Parameters used to create an application when calling deploy()
AppDeployMetaDataMetadata about an application stored in a transaction note during creation.
AppLookupCache of AppMetaData for a specific creator
AppMetaDataMetadata about a deployed app
AppReferenceInformation about an Algorand app
DeployCallArgsParameters used to update or delete an application when calling
deploy()
DeployCallArgsDictParameters used to update or delete an application when calling
deploy()
DeployCreateCallArgsParameters used to create an application when calling deploy()
DeployCreateCallArgsDictParameters used to create an application when calling deploy()
DeployResponseDescribes the action taken during deployment, related transactions and the AppMetaData
OnSchemaBreakAction to take if an Application’s schema has breaking changes
OnUpdateAction to take if an Application has been updated
OperationPerformedDescribes the actions taken during deployment

Functions

get_app_id_from_tx_idFinds the app_id for provided transaction id
get_creator_appsReturns a mapping of Application names to AppMetaData for all Applications created by specified
creator that have a transaction note containing AppDeployMetaData
replace_template_variablesReplaces TMPL_* variables in program with template_values

Data

DELETABLE_TEMPLATE_NAMETemplate variable name used to control if a smart contract is deletable or not at deployment
NOTE_PREFIXARC-0002 compliant note prefix for algokit_utils deployed applications
TemplateValueDictDictionary of `dict[str, int
TemplateValueMappingMapping of str to `int
UPDATABLE_TEMPLATE_NAMETemplate variable name used to control if a smart contract is updatable or not at deployment

API

class algokit_utils.deploy.ABICallArgs

ABICallArgs

ABI Parameters used to update or delete an application when calling deploy()

class algokit_utils.deploy.ABICallArgsDict

ABICallArgsDict

ABI Parameters used to update or delete an application when calling deploy()

Initialization

Initialize self. See help(type(self)) for accurate signature.

__contains__

contains()

True if the dictionary has the specified key, else False.

__delattr__

delattr()

Implement delattr(self, name).

__delitem__

delitem()

Delete self[key].

__dir__

dir()

Default dir() implementation.

__eq__

eq()

Return self==value.

__format__

format()

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__

ge()

Return self>=value.

__getattribute__

getattribute()

Return getattr(self, name).

__getitem__

getitem()

Return self[key].

__getstate__

getstate()

Helper for pickle.

__gt__

gt()

Return self>value.

__ior__

ior()

Return self|=value.

__iter__

iter()

Implement iter(self).

__le__

le()

Return self<=value.

__len__

len()

Return len(self).

__lt__

lt()

Return self<value.

__ne__

ne()

Return self!=value.

__new__

new()

Create and return a new object. See help(type) for accurate signature.

__or__

or()

Return self|value.

__reduce__

reduce()

Helper for pickle.

__reduce_ex__

reduce_ex()

Helper for pickle.

__repr__

repr()

Return repr(self).

__reversed__

reversed()

Return a reverse iterator over the dict keys.

__ror__

ror()

Return value|self.

__setattr__

setattr()

Implement setattr(self, name, value).

__setitem__

setitem()

Set self[key] to value.

__sizeof__

sizeof()

D.sizeof() -> size of D in memory, in bytes

__str__

str()

Return str(self).

clear

clear()

D.clear() -> None. Remove all items from D.

copy

copy()

D.copy() -> a shallow copy of D

get

get()

Return the value for key if key is in the dictionary, else default.

items

items()

D.items() -> a set-like object providing a view on D’s items

keys

keys()

D.keys() -> a set-like object providing a view on D’s keys

pop

pop()

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault

setdefault()

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update

update()

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

values()

D.values() -> an object providing a view on D’s values

class algokit_utils.deploy.ABICreateCallArgs

ABICreateCallArgs

ABI Parameters used to create an application when calling deploy()

class algokit_utils.deploy.ABICreateCallArgsDict

ABICreateCallArgsDict

ABI Parameters used to create an application when calling deploy()

Initialization

Initialize self. See help(type(self)) for accurate signature.

__contains__

contains()

True if the dictionary has the specified key, else False.

__delattr__

delattr()

Implement delattr(self, name).

__delitem__

delitem()

Delete self[key].

__dir__

dir()

Default dir() implementation.

__eq__

eq()

Return self==value.

__format__

format()

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__

ge()

Return self>=value.

__getattribute__

getattribute()

Return getattr(self, name).

__getitem__

getitem()

Return self[key].

__getstate__

getstate()

Helper for pickle.

__gt__

gt()

Return self>value.

__ior__

ior()

Return self|=value.

__iter__

iter()

Implement iter(self).

__le__

le()

Return self<=value.

__len__

len()

Return len(self).

__lt__

lt()

Return self<value.

__ne__

ne()

Return self!=value.

__new__

new()

Create and return a new object. See help(type) for accurate signature.

__or__

or()

Return self|value.

__reduce__

reduce()

Helper for pickle.

__reduce_ex__

reduce_ex()

Helper for pickle.

__repr__

repr()

Return repr(self).

__reversed__

reversed()

Return a reverse iterator over the dict keys.

__ror__

ror()

Return value|self.

__setattr__

setattr()

Implement setattr(self, name, value).

__setitem__

setitem()

Set self[key] to value.

__sizeof__

sizeof()

D.sizeof() -> size of D in memory, in bytes

__str__

str()

Return str(self).

clear

clear()

D.clear() -> None. Remove all items from D.

copy

copy()

D.copy() -> a shallow copy of D

get

get()

Return the value for key if key is in the dictionary, else default.

items

items()

D.items() -> a set-like object providing a view on D’s items

keys

keys()

D.keys() -> a set-like object providing a view on D’s keys

pop

pop()

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault

setdefault()

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update

update()

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

values()

D.values() -> an object providing a view on D’s values

class algokit_utils.deploy.AppDeployMetaData

AppDeployMetaData

Metadata about an application stored in a transaction note during creation.

The note is serialized as JSON and prefixed with NOTE_PREFIX and stored in the transaction note field as part of ApplicationClient.deploy()

class algokit_utils.deploy.AppLookup

AppLookup

Cache of AppMetaData for a specific creator

Can be used as an argument to ApplicationClient to reduce the number of calls when deploying multiple apps or discovering multiple app_ids

class algokit_utils.deploy.AppMetaData

AppMetaData

Metadata about a deployed app

class algokit_utils.deploy.AppReference

AppReference

Information about an Algorand app

algokit_utils.deploy.DELETABLE_TEMPLATE_NAME

DELETABLE_TEMPLATE_NAME

None

Template variable name used to control if a smart contract is deletable or not at deployment

class algokit_utils.deploy.DeployCallArgs

DeployCallArgs

Parameters used to update or delete an application when calling deploy()

class algokit_utils.deploy.DeployCallArgsDict

DeployCallArgsDict

Parameters used to update or delete an application when calling deploy()

Initialization

Initialize self. See help(type(self)) for accurate signature.

__contains__

contains()

True if the dictionary has the specified key, else False.

__delattr__

delattr()

Implement delattr(self, name).

__delitem__

delitem()

Delete self[key].

__dir__

dir()

Default dir() implementation.

__eq__

eq()

Return self==value.

__format__

format()

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__

ge()

Return self>=value.

__getattribute__

getattribute()

Return getattr(self, name).

__getitem__

getitem()

Return self[key].

__getstate__

getstate()

Helper for pickle.

__gt__

gt()

Return self>value.

__ior__

ior()

Return self|=value.

__iter__

iter()

Implement iter(self).

__le__

le()

Return self<=value.

__len__

len()

Return len(self).

__lt__

lt()

Return self<value.

__ne__

ne()

Return self!=value.

__new__

new()

Create and return a new object. See help(type) for accurate signature.

__or__

or()

Return self|value.

__reduce__

reduce()

Helper for pickle.

__reduce_ex__

reduce_ex()

Helper for pickle.

__repr__

repr()

Return repr(self).

__reversed__

reversed()

Return a reverse iterator over the dict keys.

__ror__

ror()

Return value|self.

__setattr__

setattr()

Implement setattr(self, name, value).

__setitem__

setitem()

Set self[key] to value.

__sizeof__

sizeof()

D.sizeof() -> size of D in memory, in bytes

__str__

str()

Return str(self).

clear

clear()

D.clear() -> None. Remove all items from D.

copy

copy()

D.copy() -> a shallow copy of D

get

get()

Return the value for key if key is in the dictionary, else default.

items

items()

D.items() -> a set-like object providing a view on D’s items

keys

keys()

D.keys() -> a set-like object providing a view on D’s keys

pop

pop()

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault

setdefault()

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update

update()

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

values()

D.values() -> an object providing a view on D’s values

class algokit_utils.deploy.DeployCreateCallArgs

DeployCreateCallArgs

Parameters used to create an application when calling deploy()

class algokit_utils.deploy.DeployCreateCallArgsDict

DeployCreateCallArgsDict

Parameters used to create an application when calling deploy()

Initialization

Initialize self. See help(type(self)) for accurate signature.

__contains__

contains()

True if the dictionary has the specified key, else False.

__delattr__

delattr()

Implement delattr(self, name).

__delitem__

delitem()

Delete self[key].

__dir__

dir()

Default dir() implementation.

__eq__

eq()

Return self==value.

__format__

format()

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__

ge()

Return self>=value.

__getattribute__

getattribute()

Return getattr(self, name).

__getitem__

getitem()

Return self[key].

__getstate__

getstate()

Helper for pickle.

__gt__

gt()

Return self>value.

__ior__

ior()

Return self|=value.

__iter__

iter()

Implement iter(self).

__le__

le()

Return self<=value.

__len__

len()

Return len(self).

__lt__

lt()

Return self<value.

__ne__

ne()

Return self!=value.

__new__

new()

Create and return a new object. See help(type) for accurate signature.

__or__

or()

Return self|value.

__reduce__

reduce()

Helper for pickle.

__reduce_ex__

reduce_ex()

Helper for pickle.

__repr__

repr()

Return repr(self).

__reversed__

reversed()

Return a reverse iterator over the dict keys.

__ror__

ror()

Return value|self.

__setattr__

setattr()

Implement setattr(self, name, value).

__setitem__

setitem()

Set self[key] to value.

__sizeof__

sizeof()

D.sizeof() -> size of D in memory, in bytes

__str__

str()

Return str(self).

clear

clear()

D.clear() -> None. Remove all items from D.

copy

copy()

D.copy() -> a shallow copy of D

get

get()

Return the value for key if key is in the dictionary, else default.

items

items()

D.items() -> a set-like object providing a view on D’s items

keys

keys()

D.keys() -> a set-like object providing a view on D’s keys

pop

pop()

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault

setdefault()

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update

update()

D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

values()

D.values() -> an object providing a view on D’s values

class algokit_utils.deploy.DeployResponse

DeployResponse

Describes the action taken during deployment, related transactions and the AppMetaData

exception algokit_utils.deploy.DeploymentFailedError

DeploymentFailedError

Common base class for all non-exit exceptions.

Initialization

Initialize self. See help(type(self)) for accurate signature.

class __cause__

cause

exception cause

class __context__

context

exception context

__delattr__

delattr()

Implement delattr(self, name).

__dir__

dir()

Default dir() implementation.

__eq__

eq()

Return self==value.

__format__

format()

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__ge__

ge()

Return self>=value.

__getattribute__

getattribute()

Return getattr(self, name).

__getstate__

getstate()

Helper for pickle.

__gt__

gt()

Return self>value.

__hash__

hash()

Return hash(self).

__le__

le()

Return self<=value.

__lt__

lt()

Return self<value.

__ne__

ne()

Return self!=value.

__new__

new()

Create and return a new object. See help(type) for accurate signature.

__reduce__

reduce()

Helper for pickle.

__reduce_ex__

reduce_ex()

Helper for pickle.

__repr__

repr()

Return repr(self).

__setattr__

setattr()

Implement setattr(self, name, value).

__sizeof__

sizeof()

Size of object in memory, in bytes.

__str__

str()

Return str(self).

add_note

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback

with_traceback()

Exception.with_traceback(tb) – set self.traceback to tb and return self.

algokit_utils.deploy.NOTE_PREFIX

NOTE_PREFIX

‘ALGOKIT_DEPLOYER:j’

ARC-0002 compliant note prefix for algokit_utils deployed applications

class algokit_utils.deploy.OnSchemaBreak

OnSchemaBreak(*args, **kwds)

Action to take if an Application’s schema has breaking changes

Initialization

AppendApp

AppendApp

3

Create a new Application

Fail

Fail

0

Fail the deployment

ReplaceApp

ReplaceApp

2

Create a new Application and delete the old Application in a single transaction

__dir__

dir()

Returns public methods and other interesting attributes.

__format__

format(format_spec)

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__hash__

hash()

Return hash(self).

__reduce_ex__

reduce_ex(proto)

Helper for pickle.

__repr__

repr()

Return repr(self).

__str__

str()

Return str(self).

name

name()

The name of the Enum member.

value

value()

The value of the Enum member.

class algokit_utils.deploy.OnUpdate

OnUpdate(*args, **kwds)

Action to take if an Application has been updated

Initialization

AppendApp

AppendApp

3

Create a new application

Fail

Fail

0

Fail the deployment

ReplaceApp

ReplaceApp

2

Create a new Application and delete the old Application in a single transaction

UpdateApp

UpdateApp

1

Update the Application with the new approval and clear programs

__dir__

dir()

Returns public methods and other interesting attributes.

__format__

format(format_spec)

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__hash__

hash()

Return hash(self).

__reduce_ex__

reduce_ex(proto)

Helper for pickle.

__repr__

repr()

Return repr(self).

__str__

str()

Return str(self).

name

name()

The name of the Enum member.

value

value()

The value of the Enum member.

class algokit_utils.deploy.OperationPerformed

OperationPerformed(*args, **kwds)

Describes the actions taken during deployment

Initialization

Create

Create

1

No existing Application was found, created a new Application

Nothing

Nothing

0

An existing Application was found

Replace

Replace

3

An existing Application was found, but was out of date, created a new Application and deleted the original

Update

Update

2

An existing Application was found, but was out of date, updated to latest version

__dir__

dir()

Returns public methods and other interesting attributes.

__format__

format(format_spec)

Default object formatter.

Return str(self) if format_spec is empty. Raise TypeError otherwise.

__hash__

hash()

Return hash(self).

__reduce_ex__

reduce_ex(proto)

Helper for pickle.

__repr__

repr()

Return repr(self).

__str__

str()

Return str(self).

name

name()

The name of the Enum member.

value

value()

The value of the Enum member.

algokit_utils.deploy.TemplateValueDict

TemplateValueDict : TypeAlias

None

Dictionary of dict[str, int | str | bytes] representing template variable names and values

algokit_utils.deploy.TemplateValueMapping

TemplateValueMapping : TypeAlias

None

Mapping of str to int | str | bytes representing template variable names and values

algokit_utils.deploy.UPDATABLE_TEMPLATE_NAME

UPDATABLE_TEMPLATE_NAME

None

Template variable name used to control if a smart contract is updatable or not at deployment

algokit_utils.deploy.get_app_id_from_tx_id

get_app_id_from_tx_id(algod_client: algosdk.v2client.algod.AlgodClient, tx_id: str) → int

Finds the app_id for provided transaction id

algokit_utils.deploy.get_creator_apps

get_creator_apps(indexer: algosdk.v2client.indexer.IndexerClient, creator_account: algokit_utils.models.Account | str) → algokit_utils.deploy.AppLookup

Returns a mapping of Application names to AppMetaData for all Applications created by specified creator that have a transaction note containing AppDeployMetaData

algokit_utils.deploy.replace_template_variables

replace_template_variables(program: str, template_values: algokit_utils.deploy.TemplateValueMapping) → str

Replaces TMPL_* variables in program with template_values