diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f749f52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +__pycache__ \ No newline at end of file diff --git a/README.md b/README.md index 74af855..eaaff17 100644 --- a/README.md +++ b/README.md @@ -6,73 +6,17 @@ This sample Python backend provides a REST API service that is used with the [Ge simple example of how to connect to and query DataStax Astra DBs. - ![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-sample-app-default.png) - -## Objectives -- How to connect to DataStax Astra DB using the secure connect bundle -- How to share a DataStax Driver Session throughout a Python application -- How to expose a basic REST API using the DataStax Driver - -## How this works -This project is built in Python and uses Flask to expose a REST API backend for use with the [Getting Started with Astra UI](https://github.com/DataStax-Examples/getting-started-with-astra-ui). - -This application is the middle man that receives requests from the UI web page and serves data from the underlying DataStax Astra DB. - -## Get Started -To build and play with this app, follow the build instructions that are located here: [https://github.com/DataStax-Examples/getting-started-with-astra-python](https://github.com/DataStax-Examples/getting-started-with-astra-python#prerequisites) - +## Astra DB Quick Start -## Prerequisites -Let's do some initial setup by creating a serverless(!) database. - -### DataStax Astra -1. Create a [DataStax Astra account](https://dtsx.io/38B5JGj) if you don't already have one: -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-register-basic-auth.png) - -2. On the home page. Locate the button **`Create Database`** -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-dashboard.png) - -3. Locate the **`Get Started`** button to continue -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-select-plan.png) - -4. Define a **database name**, **keyspace name** and select a database **region**, then click **create database**. -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-create-db.png) - -5. Your Astra DB will be ready when the status will change from *`Pending`* to **`Active`** 💥💥💥 -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-db-active.png) - -6. After your database is provisioned, we need to generate an Application Token for our App. Go to the `Settings` tab in the database home screen. -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-db-settings.png) - -1. Select `Admin User` for the role for this Sample App and then generate the token. Download the CSV so that we can use the credentials we need later. -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-db-settings-token.png) - -1. After you have your Application Token, head to the database connect screen and select the driver connection that we need. Go ahead and download the `Secure Bundle` for the driver. -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-db-connect-bundle.png) - -9. Make note of where to use the `Client Id` and `Client Secret` that is part of the Application Token that we generated earlier. -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/astra-db-connect-bundle-driver.png) - -### Github -1. Click `Use this template` at the top of the [GitHub Repository](https://github.com/DataStax-Examples/getting-started-with-astra-python): -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/github-use-template.png) - -2. Enter a repository name and click 'Create repository from template': -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/github-create-repository.png) - -3. Clone the repository: -![image](https://raw.githubusercontent.com/DataStax-Examples/sample-app-template/master/screenshots/github-clone.png) - -## 🚀 Getting Started Paths: -*Make sure you've completed the [prerequisites](#prerequisites) before starting this step* - - [Running on your local machine](#running-on-your-local-machine) - - [Running on Gitpod](#running-on-gitpod) - - [Deploying to Vercel](#deploying-to-vercel) - - [Deploying to Netlify](#deploying-to-netlify) +* [Signup for DataStax Astra](https://dtsx.io/38B5JGj), or login to your already existing account. +* [Create an Astra DB Database](https://github.com/DataStax-Examples/sample-app-template/blob/master/GETTING_STARTED.md#create-an-astra-db) if you don't already have one. + +* [Create an Astra DB Keyspace](https://github.com/DataStax-Examples/sample-app-template/blob/master/GETTING_STARTED.md#create-an-astra-db-keyspace) called `sag_netflix` in your database. +* [Generate an Application Token](https://github.com/DataStax-Examples/sample-app-template/blob/master/GETTING_STARTED.md#create-an-application-token) with the role of `Database Administrator` for the Organization that your Astra DB is in. -### Running on your local machine +## Running on your local machine If you are familiar with Python, then you've likely gotten your hands on Python virtual environments. We'll be leveraging pyenv while setting up this backend, which will serve our Spacecraft frontend that will have you flying through the stars. @@ -129,5 +73,3 @@ You should be met with the following output, note that it's running on `localhos ``` Once the backend is running, you can start the [Getting Started with Astra UI](https://github.com/DataStax-Examples/getting-started-with-astra-ui) in order to use a web page that leverages this backend. - - diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29..0000000 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy