def monthly_horoscope_route(sunsign):
    result = dict(Horoscope.get_monthly_horoscope(sunsign))
    return jsonify(month=result['month'],
                   sunsign=result['sunsign'],
                   horoscope=result['horoscope'])
def yearly_horoscope_route(sunsign):
    result = dict(Horoscope.get_yearly_horoscope(sunsign))
    return jsonify(year=result['year'],
                   sunsign=result['sunsign'],
                   horoscope=result['horoscope'])
def today_horoscope_route(sunsign):
    result = dict(Horoscope.get_todays_horoscope(sunsign))
    return jsonify(date=result['date'],
                   sunsign=result['sunsign'],
                   horoscope=result['horoscope'])
def weekly_horoscope_route(sunsign):
    result = dict(Horoscope.get_weekly_horoscope(sunsign))
    return jsonify(week=result['week'],
                   sunsign=result['sunsign'],
                   horoscope=result['horoscope'])
Exemple #5
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
@author: ashokramcse
"""

from pyhoroscope import Horoscope as _hor

your_todays_horoscope = _hor.get_todays_horoscope('stagittarius')

print(your_todays_horoscope)

print("\n")
print (your_todays_horoscope['date'])
print (your_todays_horoscope['sunsign'])
print (your_todays_horoscope['horoscope'])

print("\n")
print(_hor.get_weekly_horoscope('stagittarius'))

print("\n")
print(_hor.get_monthly_horoscope('stagittarius'))

print("\n")
print(_hor.get_yearly_horoscope('stagittarius'))
def yearly_horoscope_route (sunsign) :
	result = dict (Horoscope.get_yearly_horoscope (sunsign))
	return jsonify (year=result['year'],
			sunsign=result['sunsign'],
			horoscope=result['horoscope'])
def monthly_horoscope_route (sunsign) :
	result = dict (Horoscope.get_monthly_horoscope (sunsign))
	return jsonify (month=result['month'],
			sunsign=result['sunsign'],
			horoscope=result['horoscope'])
def weekly_horoscope_route (sunsign) :
	result = dict (Horoscope.get_weekly_horoscope (sunsign))
	return jsonify (week=result['week'],
			sunsign=result['sunsign'],
			horoscope=result['horoscope'])
def today_horoscope_route (sunsign) :
	result = dict (Horoscope.get_todays_horoscope (sunsign))
	return jsonify (date=result['date'],
			sunsign=result['sunsign'],
			horoscope=result['horoscope'])