https://github.com/syedzubeen/surrealdb_flask_starter_app
https://github.com/syedzubeen/surrealdb_flask_starter_app
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/syedzubeen/surrealdb_flask_starter_app
- Owner: syedzubeen
- Created: 2023-10-15T14:09:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-01T19:37:05.000Z (over 1 year ago)
- Last Synced: 2024-11-08T19:43:15.797Z (7 months ago)
- Language: HTML
- Size: 129 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-surreal - SurrealDB + Flask Starter - Syed Zubeen. (Starter Kits)
README
# SurrealDB + Flask Starter App
Welcome to the SurrealDB Flask Starter App repository! This project demonstrates how to install Surreal DB and run a Flask application that utilizes it. If you're ready to get started, follow the instructions below.
## Prerequisites
Before you begin, make sure you have the following prerequisites installed on your system:
- Python 3.6+
- pip
- Windows PowerShell (for Windows users)## Installation
### Install SurrealDB on Windows using PowerShell (Server Side)
For Windows users, you can install SurrealDB using Windows PowerShell. Open PowerShell and run the following command:
```bash
iwr https://windows.surrealdb.com -useb | iex
```
This command will download and install SurrealDB on your Windows system and you can monitor any incoming updates to your DB using this.**Install Dependencies:**
You can install SurrealDB using pip. Open your terminal and run the following command:
```sh
pip install -r requirements.txt
```
For more details regarding installation, you can refer to SurrealDB's official documentation [here](https://surrealdb.com/docs/integration/sdks/python).**Set Flask Environment Variables**
Before running the Flask app, you need to set the Flask environment variables. In your terminal or PowerShell window, run the following commands:
For Windows:
```bash
$env:FLASK_APP = "app.py"
$env:FLASK_ENV = "development"
```
For Linux/macOS:```bash
export FLASK_APP=app.py
export FLASK_ENV=development
```
**Run the Flask App**With the environment variables set, you can now run the Flask application. In your terminal or PowerShell, run the following command:
```bash
flask run
```
This command will start the Flask development server, and you can access the SurrealDB Starter App in your web browser by navigating to http://localhost:5000.### CRUD Operations
## Creating a user with DB

## Updating details for a user in the DB

## Deleting a user from the DB

### Contributing
If you'd like to contribute to this project, please feel free to fork the repository and submit a pull request.### Issues and Support
If you encounter any issues or have questions, please open an issue on this repository, and I'll do my best to assist you.