BasicReturns is published on PyPI and can be added to any Python project with a single command. This page covers system requirements, all supported installation methods, how to verify the installation, and how to configure type checking to take advantage of the library’s built-in type annotations.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dev2forge/BasicReturns/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
Before installing, make sure your environment meets the following requirements.| Requirement | Minimum version |
|---|---|
| Python | 3.8 (3.8, 3.9, 3.10, 3.11, and 3.12 are all tested) |
| pydantic | 2.12.5 — installed automatically as a dependency, no manual action needed |
Installation
Choose the package manager you already use in your project.- pip
- pip3
- uv
- Poetry
Verify the Installation
After installing, confirm the correct version is available in your environment by importing the package and printing its__version__ attribute.
ModuleNotFoundError, double-check that the install command ran inside the same virtual environment you are using to run Python.
Type Checking Setup
BasicReturns ships apy.typed marker file (as specified in PEP 561). This means no extra configuration is needed — both MyPy and Pyright automatically discover the package’s type annotations when they are installed in the same environment as BasicReturns.
To confirm that MyPy can resolve the types in a module that uses BasicReturns, run:
BasicReturn, DataAndMsgReturn, and all their fields are fully typed and visible to the type checker. Pyright (used by Pylance in VS Code) picks up the same information automatically without any additional settings.