Skip to content

Commit

Permalink
hacky=>hackr
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwini0529 committed Sep 26, 2017
1 parent 201df14 commit b674ecd
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
hacky: Unicorn library for Hackathons
hackr: Unicorn library for Hackathons
=====================================

An All-in-one library, safe for hackathon consumption.
Expand All @@ -8,7 +8,7 @@ You can perform each and every task using a single library.
Features
--------

hacky currently supports the following features:
hackr currently supports the following features:

- Generate random names
- Generate random address
Expand All @@ -20,44 +20,44 @@ hacky currently supports the following features:
- Parse data in JSON
- Send Emails

hacky officially supports Python 2.7 currently.
hackr officially supports Python 2.7 currently.

Usage
-----

Generate Random names


>>> import hacky
>>> a = hacky.generator.names(5)
>>> import hackr
>>> a = hackr.generator.names(5)
>>> print a
[u'Mr. Thomas Wolf MD', u'Valerie Turner', u'Maria Knight', u'Raymond Shelton', u'Erica Glenn']

Generate Random dates

>>> import hacky
>>> a= hacky.generator.dates(5,1995,2017)
>>> import hackr
>>> a= hackr.generator.dates(5,1995,2017)
>>> print a
['1998-08-17 00:00:00', '2007-03-25 00:00:00', '2003-01-27 00:00:00', '2014-10-13 00:00:00', '1995-02-10 00:00:00']

Scrape a webpage

>>> import hacky
>>> a= hacky.web.scrape("https://api.github.com/users/ashwini0529")
>>> import hackr
>>> a= hackr.web.scrape("https://api.github.com/users/ashwini0529")

Make Web Requests

>>> import hacky
>>> import hackr
>>> #If you want the response as a string
>>> a= hacky.web.request("http://httpbin.org/post", method="post", params={'a':'b'})
>>> a= hackr.web.request("http://httpbin.org/post", method="post", params={'a':'b'})
>>> If you want the response as JSON
>>> a= hacky.web.request("http://httpbin.org/post", method="post", params={'a':'b'}, type="JSON")
>>> a= hackr.web.request("http://httpbin.org/post", method="post", params={'a':'b'}, type="JSON")

Send Emails

>>> import hacky
>>> import hackr
>>> #Enter your GMAIL email address and password in the parameters email, and password.
>>> hacky.actions.email("Hey there", email="[email protected]", password="foobar", to="[email protected]", subject="Foo Bar")
>>> hackr.actions.email("Hey there", email="[email protected]", password="foobar", to="[email protected]", subject="Foo Bar")


Contribution Guidelines
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion hacky/actions.py → hackr/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'''
A function to send emails using SMTP (GMAIL)
Sample usage: hacky.actions.email("Hey there",
Sample usage: hackr.actions.email("Hey there",
email="[email protected]", password="foobar", to="[email protected]", subject="Foo Bar")
'''
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
with open('requirements.txt') as f:
required = f.read().splitlines()

setup(name='hacky',
setup(name='hackr',

version='0.1',
version='0.1.1',

url='https://github.com/pytorn/hacky',
url='https://github.com/pytorn/hackr',

license='Apache 2.0',

Expand Down

0 comments on commit b674ecd

Please sign in to comment.