Github repository: https://github.com/jearistiz/phys_simulation
Documentation: https://phys-simulation.readthedocs.io
Video: https://www.youtube.com/watch?v=2QGRTdbjzLU
PHYS Simulation is a web application and API built on top of FastAPI. Using PHYS Simulation you can request simulations of some physical or mathematical systems such as the Harmonic Oscillator or the Chen-Lee Attractor –and soon many others, stay tuned!
All the information about the project, including the source code documentation is included in the documentation website.
For specific topics visit:
- GETTING STARTED
- THE CODE
-
Before installing PHYS Simulation make sure you install pipenv.
-
To download PHYS Simulation clone it from the github repository using the following command
$ git clone https://github.com/jearistiz/phys_simulation
-
Change to the directory where PHYS Simulation is installed
$ cd phys_simulation
-
Create a virtual environment and install all the requirements using
pipenv
(this can take several minutes)$ pipenv install
-
Activate the virtual environment
$ pipenv shell
-
Finally run the web application in your localhost http://0.0.0.0:5700/
$ pipenv run simulation_api
You can manage
HOST
andPORT
variables in the server configuration file~/phys_simulation/config.py
.
The project runs on a Uvicorn server. The file in charge of setting up and starting the server is
~/phys_simulation/run.py
. Change the options to your prefferred ones.If you run the server locally you can try the frontend and API in the host and port you chose. The frontend is almost self-explanatory
If you want to try out the API, go to the Examples section in the official documentation. We also explain how to use the API in general terms in the Overview section.
The API has its own client documentation, thanks to FastAPI's integration with Swagger (formerly OpenAPI). To read this docs, after starting the server go to the resource
localhos:5700/docs
orlocalhos:5700/redoc
and refer to the documentation of the resources starting with/api/
.If you want to stop the server, go to the terminal where you started it and use the shortcut
Ctrl + C
.If you want to remove the virtual environment after using the app move to
~/phys_simulation/
directory and execute$ pipenv --rm
Some of the concepts and frameworks needed to develop this application are listed below:
- HTTP: Hypertext Transfer Protocol
- FastAPI: Python framework used to develop APIs
- SQL: Sequel Query Language
- SQLAlchemy: Python library for database management
- Pytests: Python unitary tests
- HTML: Hypertext Markup Language
- CSS: Cascade Style Sheet
- Jinja: HTML templates framework
- Sphinx: Python documentation framework