A tool to configure environment variables interactively.
Project description
envmate
envmate
is an interactive command-line tool designed to simplify the process of configuring environment variables for your Python projects. It provides a user-friendly interface to set up .env
files for various Python frameworks such as Flask, Django, and FastAPI, as well as configure database connections, authentication systems, and other essential settings.
Features
- Interactive Setup: Guides you through the process of setting up environment variables with an easy-to-use interactive prompt.
- Support for Multiple Frameworks: Configure environment variables for Flask, Django, and FastAPI projects.
- Database Configuration: Supports both SQL (PostgreSQL, MySQL) and NoSQL (MongoDB, Cassandra) databases.
- Authentication Setup: Allows you to set up JWT or session-based authentication, including access and refresh tokens.
- Custom Environment Variables: Add custom environment variables specific to your project's needs.
- Configuration Templates: Save and reuse configuration templates to streamline the setup process for future projects.
- Environment-specific Settings: Configure variables for different environments like development, testing, and production.
Installation
You can install envmate
using pip:
pip install envmate
Usage
After installation, you can use the tool via the command line:
env-configurator
The tool will prompt you to select the Python framework you are using and guide you through setting up the necessary environment variables.
Example Workflow
$ env-configurator
Welcome to the Python Environment Configuration Tool!
What kind of Python stack are you using?
> Flask
Django
FastAPI
Which environment are you configuring?
> development
testing
production
Are you building an authentication system? (Y/n): Y
What type of authentication are you using?
> JWT
Session-based
Do you need access and refresh tokens? (Y/n): Y
Will your application use email protocols? (y/N): N
Will your application use Redis? (y/N): N
Will your application use SQL databases? (Y/n): Y
Will your application use NoSQL databases? (y/N): Y
Will your application use Elasticsearch? (y/N): N
Flask environment:
> development
production
Flask secret key: <generated_secret>
Enable debug mode? (y/N): Y
CORS origins: http://localhost:3000
Which NoSQL database are you using?
> MongoDB
Cassandra
MongoDB URI: mongodb://localhost:27017
Configuration Summary:
FLASK_ENV=development
SECRET_KEY=<generated_secret>
DEBUG=True
CORS_ORIGINS=http://localhost:3000
MONGODB_URI=mongodb://localhost:27017
Here is the summary of your configuration. Do you want to write it to the .env file? (Y/n): Y
.env variables have been written successfully.
Do you want to save this configuration as a template? (y/N): N
Process completed successfully!
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please read the CONTRIBUTING.md file for more information on how to contribute to this project.
Issues
If you encounter any issues or have suggestions for improvements, please report them on the GitHub issue tracker.
Author
Developed by harris-ahmad.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file envmate-0.4.0.tar.gz
.
File metadata
- Download URL: envmate-0.4.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b6cfbd8cfe317725a9f17736cae04b50995a83769de9d192a6df20cd18af0e |
|
MD5 | d8ba5b70b61f521413a4eefc66be03c0 |
|
BLAKE2b-256 | 3801c204fefc3b04524875fa79569d67b939ef8c07631408edc3c96a55616430 |
File details
Details for the file envmate-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: envmate-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489648f5da0d3e54454f7a61b4212fd43faa544ec73e1933ab899bd028ac72bf |
|
MD5 | 1443c5b2cd2ab523cf54e82fee285490 |
|
BLAKE2b-256 | 965e1315311302217c0934ca4498018e55436c406fab658aa446f07b20066578 |