Pulsewave is a lightweight Python scaffolding designed for developing REST APIs with simplicity and flexibility. It includes features like environment-based database configuration, routing, CRUD & Complex operations, middleware, and JWT authentication.

Configuration

To ensure the application runs smoothly, you need to configure some basic settings. Start by creating a .env file from the .env.example template and adjust environment variables such as database settings and JWT keys according to your environment. Make sure to fill in details like host, port, username, and password for database connections, as well as the secret key for authentication. Once the configuration is complete, you can proceed with installing dependencies and running the application as outlined in the documentation.

Environment Settings

Copy .env.example to .env and modify the environment variables as needed.

cp .env.example .env

Environment files look like this:

# Database Configuration
# PostgreSQL: postgresql+psycopg2://postgres:[email protected]:5432/pulsewave
# MySQL: mysql+pymysql://postgres:[email protected]:3306/pulsewave
DATABASE_URL=

# JWT Configuration
SECRET_KEY=
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30

# Flask Configuration
FLASK_ENV=development
FLASK_APP=pulsewave.py
FLASK_RUN_PORT=5000

# Other Configurations
DEBUG=True

Generate the secret key for JWT authentication and pass it to SECRET_KEY variable.

python ./scripts/jwt_key.py

Dependencies Installation and Start Local Server

For dependencies Installation you can run this prompt:

pip install -r requirements.txt

When configuration and installation complete you can run the local server using Python Flask

python ./pulsewave.py

Available Commands