# Development Standards

### Python3 <a href="#python" id="python"></a>

#### Dependency management <a href="#dependency-management" id="dependency-management"></a>

* We are using [poetry](https://python-poetry.org/) as a dependency management and virtual environment tool

#### Logging <a href="#logging" id="logging"></a>

* Use the [built in logging module](https://docs.python.org/3/library/logging.html) for logging over `print()` for big projects.
* For debugging print also uses the logging module, example:

```
import logging

logger = logging.getLogger(__name__)

logger.debug("debug message")
logger.info("info message")
logger.error("error message")
logger.warning("warning message")

try:
    ...
except Exception as e:
    logger.exception(e)
```

### Rust <a href="#python" id="python"></a>

* TBA

### Database and ORM <a href="#database-and-orm" id="database-and-orm"></a>

#### **SQL**

* [Sqlalchemy](https://www.sqlalchemy.org/) or [Flask-SQLAlchemy](https://flask-sqlalchemy.readthedocs.io/en/stable/) (if used with flask)

### HTTP Requests and Tooling

Use [httpx](https://www.python-httpx.org/) instead of [requests](https://pypi.org/project/requests/). Note some services might only allow HTTP2.

### Javascript/Typescript <a href="#javascripttypescript" id="javascripttypescript"></a>

#### Dependency management <a href="#dependency-managementdf02d40c" id="dependency-managementdf02d40c"></a>

We are using [pnpm](https://pnpm.io/) (not npm) as a dependency management tool

**Optional Advice**

Use NestJs for backend if you willing to put in some time for learning. It has some learning curve, but it is a very rewarding framework and is becomming an industry standart.

### Cryptography and Hashing

We use Blake3 for hashing and Polkadot cryptography libraries (for now).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.gen6.life/developer-resources/development-standards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
