sample - Python SQLLite
This repository contains a Python SQLLite example for building and deploying the service on the AosEdge platform.
Follow this guide to download and install the SDK, set up your environment, compile the service, store the database in persistent storage, create the service on AosCloud, and sign and upload service.
You can explore the example by checking out the source code.
Prerequisites
- Target unit: a supported platform (VirtualBox or Raspberry Pi).
- AosCloud account: an SP user account for AosCloud. See the AosEdge dictionary for user types and the Get access page for login help.
- Tools: AosCore SDK, SQLLite, CMake, Bash, Wget, Python and a virtual environment (
venv) are installed.
Prepare service for upload
Before signing and uploading your service to AosCloud, prepare the service by organizing the compiled binary and updating the configuration with the service UUID obtained from the Create service on AosCloud step.
Open the service configuration file ./meta/config.yaml and update the service_id field with the UUID you copied from the Service Detail screen in AosCloud:
nano ./meta/config.yaml
Example config.yaml:
service_id: '<YOUR_SERVICE_UUID>'
Replace <YOUR_SERVICE_UUID> with the UUID saved earlier. Save and close the file.
Sign and upload service version
Use the aos-signer go tool to sign and upload your service to AosCloud.
In the service directory, run:
~/.aos/venv/bin/python3 -m aos_signer go
Expected output:
Starting SERVICE SIGNING process...
Starting CONFIG VALIDATION process...
Validating config... VALID
Copying application... DONE
Copying configuration... DONE
Copying default state... SKIP
Creating archive... DONE
Sing package... DONE
Creating service package... DONE
*
Starting SERVICE UPLOAD process...
Starting CONFIG VALIDATION process...
Validating config... VALID
Uploading... DONE
On success, the output ends with an Uploaded message. Verify the service details on the Services section of AosCloud.
Link unit and service together
Once your service is created and uploaded to the cloud, the next essential step is to link it with your unit.
You can accomplish this by creating a subject, which acts as the bridge between your unit and the service.
For detailed instructions on how to set this up, please refer to the following guide.
Please see Creating subject,
Access subject,
Assign unit to subject,
Assign service to subject chapters.
Approve service
Before installing a service on a unit or updating an existing one, you must approve these changes.
For detailed instructions on how to set this up, please refer to the following guide.
Please see Approve service сhapter.
Validate result of service
-
For detailed instructions on working with logs, please refer to the Validate result of service chapter.
-
Open the log file in a text editor and search for the message
"[AosEdge] Print session list:"and some logs below as on screenshots.

If the message is found, the service is working correctly.