Skip to content

Commit 4df4da5

Browse files
Support Python virtual environment
1 parent 7f3172d commit 4df4da5

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

docs/frameworks.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,61 @@ if __name__ == "__main__":
7878
uvicorn.run()
7979
```
8080

81+
## Python Virtual Environment Support
82+
83+
AtlasServer supports running applications within Python virtual environments, ensuring proper isolation and dependency management for your projects.
84+
85+
### Automatic Environment Detection
86+
87+
When you specify a project directory, AtlasServer automatically scans for Python virtual environments:
88+
89+
1. **Standard virtual environments** (venv, virtualenv)
90+
- Directories named: `venv`, `.venv`, `env`, `.env`, `virtualenv`, `pyenv`
91+
- Any directory containing `env` in its name
92+
93+
2. **Poetry environments**
94+
- Detected via `poetry.lock` or `pyproject.toml` files
95+
- Typically located in `.venv` within your project
96+
97+
3. **Pipenv environments**
98+
- Detected via `Pipfile`
99+
- Location determined by running `pipenv --venv`
100+
101+
4. **Conda environments**
102+
- Detected via `environment.yml`
103+
- Matched with installed conda environments
104+
105+
### Environment Configuration
106+
107+
When registering an application, you can:
108+
109+
1. **Use automatic detection** (recommended)
110+
- Simply enter your project directory, and AtlasServer will detect and select the appropriate environment
111+
112+
2. **Manually select an environment**
113+
- Choose from detected environments in the dropdown menu under "Advanced Options"
114+
115+
### Ensuring Proper Detection
116+
117+
For reliable environment detection:
118+
119+
- **Standard practice**: Create virtual environments in your project's root directory using standard names (`venv`, `.venv`)
120+
- **Custom environments**: Include "env" somewhere in the folder name for custom environments
121+
- **Poetry/Pipenv**: Use the standard workflow (the environment will be detected automatically)
122+
- **Conda**: Include an `environment.yml` file in your project directory
123+
124+
### Environment Support Example
125+
126+
When using a virtual environment, your project structure might look like:
127+
128+
```
129+
my_fastapi_project/
130+
├── .venv/ # Virtual environment (auto-detected)
131+
├── app.py # Main application file
132+
├── requirements.txt # Dependencies
133+
└── ...
134+
```
135+
81136
## Coming Soon to AtlasServer Core
82137

83138
We're working on adding support for more Python frameworks:

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ AtlasServer is a local deployment platform designed for developers who need to q
1515
- **Real-time Logs**: View application logs directly in the dashboard
1616
- **Multi-user Support**: Manage access with different user roles and permissions
1717
- **Secure By Design**: Keep your development environment under your control, not in the cloud
18+
- **Python virtual environment**: Add Python virtual environment auto-detection
1819

1920
## Who is it for?
2021

0 commit comments

Comments
 (0)