https://github.com/harshsinghvi/stackapi
Stack Implementation Using API in Python.
https://github.com/harshsinghvi/stackapi
api flask mongodb python rest rest-api stack
Last synced: about 1 month ago
JSON representation
Stack Implementation Using API in Python.
- Host: GitHub
- URL: https://github.com/harshsinghvi/stackapi
- Owner: harshsinghvi
- License: mit
- Created: 2020-11-20T09:11:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-20T05:32:07.000Z (about 4 years ago)
- Last Synced: 2025-02-05T09:18:31.218Z (3 months ago)
- Topics: api, flask, mongodb, python, rest, rest-api, stack
- Language: HTML
- Homepage: https://stackapi.vercel.app/
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔥 [StackAPI](https://stackapi.projects.harshsinghvi.com/)
Stack Implementation Using API in Python.
> Stack is a linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). There are many real-life examples of a stack. Consider an example of plates stacked over one another in the canteen.
[](hhttps://github.com/harshsinghvi/stackapi)
[](https://github.com/harshsinghvi/stackapi/blob/master/LICENSE)
[](https://github.com/harshsinghvi/stackapi)
[](https://github.com/harshsinghvi/)
[](https://GitHub.com/harshsinghvi/UniversalGPIO/graphs/commit-activity)[](https://GitHub.com/harshsinghvi/stackapi/network/)
[](https://GitHub.com/harshsinghvi/stackapi/stargazers/)
[](https://GitHub.com/Naereen/harshsinghvi/stackapi/watchers/)## 🚀 Deployments
* **Production Build** [https://stackapi.vercel.app](https://stackapi.vercel.app)
> Check out Latest Production Version [https://stackapi.vercel.app](https://stackapi.vercel.app) (Using Serverless Functions and MongoDB).
* Old deployment [https://stackapi-app.herokuapp.com/](https://stackapi-app.herokuapp.com/) (Old with some Bugs).
## 📘 API Documentation
| Resource | Parameters | Response | Description |
| --------------- | -------------- | ------------ | ----------- |
| `/` | `None` | Html | Web App to visualize StackAPI. |
| `GET /stack` | `None` | Json | Get complete stack in Json format. |
| `GET /pop` | `None` | Json | POP the element in the Stack. |
| `GET /push` | `data` | Json | PUSH an element in the Stack (`/push?data=`). |## Usage
* Clone the repo `git clone https://github.com/harshsinghvi/stackapi && cd stackapi`
* Edit `sample.config.py`- Change the mongo MONGO_DB_URI
- Rename to *`config.py`*
- `mv sample.config.py config.py`* Install depndencies `pip install -r requirements.txt`
* Run flask server `python index.py`> __[Optional]__ To deploy it to vercel using serverless functions Install **Vercel cli** and deploy to production by running `vercel --prod`.
## ✨ Features
* Serverless
* Made Using JAM Stack
* Static Web UI## 👾 Contributors
### 👨💻[Harsh Singhvi](https://harshsinghvi.com)
[![Twitter][1.1]][1]
[![Facebook][2.1]][2]
[![Github][3.1]][3]
[![LinkedIn][4.1]][4][1.1]: http://i.imgur.com/wWzX9uB.png (twitter icon without padding)
[2.1]: http://i.imgur.com/fep1WsG.png (facebook icon without padding)
[3.1]: http://i.imgur.com/9I6NRUm.png (github icon without padding)
[4.1]: https://raw.githubusercontent.com/MartinHeinz/MartinHeinz/master/linkedin-3-16.png (LinkedIn icon without padding)[1]: http://www.twitter.com/harshsinghvi29
[2]: http://www.facebook.com/insomniaccoderharsh
[3]: http://www.github.com/harshsinghvi
[4]: https://www.linkedin.com/in/harsh-singhvi/## 📜 Refrences
* [Deploying a Serverless Flask app to Vercel](https://dev.to/andrewbaisden/how-to-deploy-a-python-flask-app-to-vercel-2o5k)
* [Env Variables in Python](https://www.askpython.com/python/environment-variables-in-python)