Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Created Workers #3

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Created Workers #3

wants to merge 8 commits into from

Conversation

Icebearbear
Copy link
Member

@Icebearbear Icebearbear commented Feb 11, 2020

  • installed Pipenv for dependencies management
  • installed requests library for HTTP request with pivenv
  • get bearer token for Twittter api
  • data fetching from Twitter api in JSON format

installed Pipenv for dependencies management
installed libraries for HTTP request with pivenv
installation details can be found in README.md

Data fetching is done using requests library in worker.py
before start fetching data, get all the keys and tokens
required for this transaction
all the detailscan be found in README.md
@Icebearbear Icebearbear self-assigned this Feb 11, 2020
workers/README.md Outdated Show resolved Hide resolved
@Icebearbear Icebearbear changed the title Pipenv installation and Twitter API data fetch Created Worker Branch Feb 13, 2020
- installed a library called python-detonv to manage the environment
variables files
- edited README.md file
@Jaimeloeuf Jaimeloeuf changed the title Created Worker Branch Created Workers Feb 15, 2020
@Jaimeloeuf
Copy link
Member

  1. Please do not commit your .env file!
    • Purge your env file
    • Add note in README to explain what are the variables needed in the env file, and show a sample .env file in a sample/ directory instead of commiting your private .env file
  2. Add a gitignore in repo root too!

Icebearbear and others added 3 commits February 15, 2020 14:07
1.  deleted worker and moved logic into connect_to_postgres
2.  updated env with postgres connection details
3.  updated README to describe .env
4.  added a section to describe postgres connection and queries into
    README
merge master to feat/worker for gitignore
1.  installed SQLAlchemy as ORM with pipenv
2.  made a connection to postgres database
3.  inserted the data into database
4.  updated README file to describe the ORM connection
- steps to creat and use env file
- dscription of every variables in env file

#ORM query
query = tweets.insert().values(name = name , text = text , time = time).returning(tweets.c.id)
result = connection.execute(query)

else :
print('Result for' , search_url , 'is unsuccesful')
print('Request unsuccesful')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont commit changes in ur py file when the commit is about ENV vars in README

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants