samj1912 / pykarma

A python API wrapper for Karma Decay

Home Page:https://pypi.python.org/pypi/pykarma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pykarma

Unofficial Python API wrapper for karmadecay.com

Usage

from pykarma import find

# Fetch only the submission URLs of the matches
results = find("http://i.imgur.com/OOFRJvr.gifv")
for result in results:
    print(result)

# Fetch matches within a specific subreddit
results = find("http://i.imgur.com/OOFRJvr.gifv", subreddit="example")
for result in results:
    print(result)

# Fetch matches within multiple subreddits
results = find("http://i.imgur.com/OOFRJvr.gifv", subreddit=["example", "bottesting"])
for result in resultS:
    print(result)

# Fetch complete details about the matches
results = find("http://i.imgur.com/OOFRJvr.gifv", fetch_praw=True)
for result in results:
    print(result.url)
    print(result.score)

You can also combine fetch_praw and subreddit to get submission objects on a specific subreddit

The API returns a PRAW Submission Object. Read the PRAW documentation to learn how to use it.

Installation

  • From pip:

      pip install pykarma
    
  • From source:

      git clone https://github.com/samj1912/pykarma
      python setup.py install
    

About

A python API wrapper for Karma Decay

https://pypi.python.org/pypi/pykarma

License:MIT License


Languages

Language:Python 100.0%