Practical overview
When it fits
Use it when developing Python-based smart contracts for Xian and when a workflow needs the framework’s storage types, contract client or execution metering.
Who it is for
- Developers writing smart contracts for the Xian Network.
- Python developers who want contract storage, callable methods and a client interface in their development workflow.
Documented uses
- Write contract initialization and externally callable functions.
- Represent contract state with single-value or keyed storage.
- Submit contract code, retrieve a contract instance and call its methods through ContractingClient.
- Check contract code for common issues with the documented linter.
Requirements & limits
- The framework targets Xian smart-contract development rather than general Python application development.
- Contracts use a subset of Python with additional framework constructs and import controls.
- The documentation describes a local client interface but does not specify a network deployment or transaction-signing workflow.
- The repository states that use is non-commercial under Creative Commons Attribution-NonCommercial 4.0 International.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Submit contract code and call a contract method with ContractingClient
Use the documented client interface to submit contract code, retrieve the contract instance and invoke a method.
Before you start
- Xian Contracting installed.
- Contract code saved in a file.
- A Python environment in which to use
ContractingClient.
Steps
Import
ContractingClientfromcontracting.clientand initialize a client.Read the contract code from a file.
Submit the code with
client.submit, providing a contract name and code.Retrieve the contract with
client.get_contractand call a method on the returned instance.
Expected outcome
The documented workflow submits contract code and demonstrates retrieving and calling a contract method through the client.
Guide limitations
- The example does not specify a network connection, deployment configuration or transaction-signing procedure.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- xian-network/xian-contracting · Official homepage title · retained in its source language

