https://github.com/camdavidsonpilon/python_packages_survey
https://github.com/camdavidsonpilon/python_packages_survey
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/camdavidsonpilon/python_packages_survey
- Owner: CamDavidsonPilon
- Created: 2019-01-14T03:40:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-29T14:54:09.000Z (over 7 years ago)
- Last Synced: 2025-09-09T22:03:22.149Z (9 months ago)
- Language: Python
- Homepage: https://python-packages-survey.com
- Size: 2.5 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Packages Survey
Take the survey:
https://python-packages-survey.com/
## Development
#### Local Development
The main app is Python 3.6+:
```
$ brew install python3
$ pip3 install -r requirements.txt
```
```
$ brew install postgres
$ brew services start postgresql
```
To create the database for the first time: `createdb testdb`.
To create the tables locally for the first time:
```
$ python
> from main import db
> db.create_all() # inverse is db.drop_all()
```
Run the flask server locally
```
$ FLASK_ENV=development FLASK_APP=main.py python -m flask run
```
visit localhost:5000
#### Deployment and Production
To deploy (Python 2.7 required)
```
gcloud app deploy
```
To modify the tables in prod GCP (run `./cloud_sql_proxy`)
```
$ ./cloud_sql_proxy -dir=/cloudsql &
$ DBUSER=postgres DBPASS= INSTANCE_CONNECTION_NAME=pip-project-survey:northamerica-northeast1:testdb DBDATABASE=testdb ipython
> from main import db
> db.create_all() # inverse is db.drop_all()
```