Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crispengari/python-backend
💎 A quick start for web server development using python flask, django and fastapi.
https://github.com/crispengari/python-backend
css django djangorestframework fastapi flask graphql graphql-api html javascript orm python redis scss server sqlalchemy-python typescript webdevelopment
Last synced: 4 days ago
JSON representation
💎 A quick start for web server development using python flask, django and fastapi.
- Host: GitHub
- URL: https://github.com/crispengari/python-backend
- Owner: CrispenGari
- License: apache-2.0
- Created: 2021-05-27T11:08:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T07:06:34.000Z (12 days ago)
- Last Synced: 2025-01-13T08:21:27.977Z (11 days ago)
- Topics: css, django, djangorestframework, fastapi, flask, graphql, graphql-api, html, javascript, orm, python, redis, scss, server, sqlalchemy-python, typescript, webdevelopment
- Language: Python
- Homepage:
- Size: 2.81 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Python Backend
This repository contains some examples of backend applications using:
1. [Flask](https://flask.palletsprojects.com/en/stable/)
2. [Django](https://www.djangoproject.com/)
3. [Fast API](https://fastapi.tiangolo.com/)
### Creating a virtual environment
There are two ways of creating a virtual environment in python.
1. creating a virtual environment from a already exists folder.
- to create a virtual environment in the existing folder you first need to navigate to the folder that you wnt to create virtual environment by running the command:
```shell
cd myv
```- then you run the following command to create a virtual environment
```shell
virtualenv .
```> This just means create a virtual environment in the current directory.
2. creating a virtual environment and naming it.
- to create a virtual environment by name you run the following command:
```shell
virtualenv venv
```### Activating virtual environment
To activate virtual environment you have to run the `activate.bat` file that will be generated in virtual environment that you have created for example:
```shell
.\venv\Scripts\activate
# or
.\venv\Scripts\activate.bat
```> Activating the first virtual (myv) you will do it as follows:
```shell
.\Scripts\activate
# or
.\Scripts\activate.bat
```### Deactivating virtual environment
To deactivate virtual environment you have to run the `deactivate.bat` file that will be generated in virtual environment that you have created for example:
```shell
.\venv\Scripts\deactivate
# 1.
.\venv\Scripts\deactivate.bat
```> Activating the first virtual (myv) you will do it as follows:
```shell
.\Scripts\deactivate
# 1.
.\Scripts\deactivate.bat
```> I recommend to navigate to the project directory after creating a virtual environment before installing packages:
```shell
📁 root
📁 venv
```To install the packages after activating the virtual environment you just run the following command:
```shell
pip install# example
pip install numpy
```### Getting an error?
If you are getting a command error that says:
```shell
'virtualenv' is not recognized as an internal or external command,
operable program or batch file.
```You could try to install `virtualenv` using pip as follows:
```shell
pip install virtualenv
```Or
```shell
python -m pip install virtualenv
```