Skip to content

Commit

Permalink
added setup file
Browse files Browse the repository at this point in the history
  • Loading branch information
dermasmid committed Nov 2, 2020
1 parent 6eaf37a commit a9ab33b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.pyc
notes.txt

build/
dist/
*.egg-info/
20 changes: 9 additions & 11 deletions README.md
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)
```

2 changes: 1 addition & 1 deletion pytogle/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import gmail
__version__ = '0.16.1'
37 changes: 37 additions & 0 deletions setup.py
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'
)

0 comments on commit a9ab33b

Please sign in to comment.