Prerequisite:
- Node.js version at least 16.x, recommended to use the latest one.
Installation:
Create a new JavaScript project and follow the steps below to set up a new instance of the peaq sdk.1
Create a Node.js project
Run command
npm init -y
to create a Node.js project.2
Install the SDK
3
Enable ES Modules
In the
package.json
file, add "type": "module"
to enable ES Modules.4
Create a JavaScript file
Create a new
.js
file.5
Write your code
Write the JavaScript code that interacts with the SDK.
6
Execute your code
Run command:
node file_name.js
to execute.Python SDK Quickstart
Prerequisite:
- Python Version 3.8+ installed on your system.
Installation:
1
Setup Virtual Environment
Mac/Linux:Windows:
npm
npm
2
Install the SDK
3
Setup Requirements.txt
python-dotenv==1.1.0
to this file to enable environment variables. Install with pip install -r requirements.txt
.4
Create a Python file
Create a new
.py
file.5
Write your code
Write Python code that interacts with the SDK.
6
Execute your code
Run command:
python file_name.py
to execute.