-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.pyc | ||
notes.txt | ||
|
||
build/ | ||
dist/ | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
### Note: | ||
pytogle is in it's very early stages and for now only has implemented a wrapper for Gmail. | ||
# Note | ||
|
||
## Getting Started: | ||
pytogle is in it's very early stages and for now only has implemented a wrapper for Gmail. | ||
|
||
For now theres no pip package for the module so you"ll have to download the files manualy to the folder in which your python packages are installed. | ||
## Getting Started | ||
|
||
``` bash | ||
git clone https://github.com/dermasmid/pytogle | ||
pip3 install pytogle | ||
``` | ||
|
||
Then you need to get a client secret file from [the google console](https://console.developers.google.com/) and you need to enable the api you want to use, just google it. | ||
|
||
after you saved the json file to your workdir - you are all set! | ||
After you saved the json file to your workdir - you are all set! | ||
|
||
to use the gmail api simply create a python file and enter this: | ||
To use the Gmail API simply create a python file and enter this: | ||
|
||
``` python | ||
from pytogle import Gmail | ||
import pytogle | ||
|
||
mailbox = pytogle.gmail.Gmail() | ||
|
||
mailbox = Gmail() | ||
|
||
for msg in mailbox.get_messages('inbox'): | ||
print(msg) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from . import gmail | ||
__version__ = '0.16.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from setuptools import setup, find_packages | ||
import re | ||
|
||
|
||
with open('README.md', encoding='utf-8') as f: | ||
readme = f.read() | ||
|
||
with open("pytogle/__init__.py", encoding="utf-8") as f: | ||
version = re.findall("__version__ = '(.+)'", f.read())[0] | ||
|
||
|
||
with open("requirements.txt", encoding="utf-8") as f: | ||
requirements = [r.strip() for r in f] | ||
|
||
|
||
|
||
|
||
setup( | ||
name = 'Pytogle', | ||
version = version, | ||
packages = find_packages(), | ||
url = 'https://github.com/dermasmid/pytogle', | ||
license = 'MIT', | ||
long_description = readme, | ||
long_description_content_type = 'text/markdown', | ||
author = 'Cheskel Twersky', | ||
author_email= '[email protected]', | ||
description = 'A Python wrapper for the google APIs', | ||
keywords = 'gmail gmail-api drive google-drive google-drive-api api-wrapper python3 python', | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT", | ||
"Operating System :: OS Independent", | ||
], | ||
install_requires = requirements, | ||
python_requires='>=3.6' | ||
) |