Skip to content

Commit

Permalink
Merge pull request #2 from antonio-hickey/TOMO
Browse files Browse the repository at this point in the history
Repackaged
  • Loading branch information
antonio-hickey authored Jun 25, 2021
2 parents c60dea6 + 60db904 commit 174f7c2
Show file tree
Hide file tree
Showing 19 changed files with 107 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change Log
==========

1.0.1 (06/25/2021)
------------------
- First Release
File renamed without changes.
Binary file added FedPy/SOMA/__pycache__/soma.cpython-38.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion SOMA/soma.py → FedPy/SOMA/soma.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"""

# Import Modules
from utils.date_handler import DatesHandler as datesHand
from .utils.date_handler import DatesHandler as datesHand
from bs4 import BeautifulSoup as bs
import requests as req
import pandas as pd
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion utils/date_handler.py → FedPy/SOMA/utils/date_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime as dt
import calendar

class DatesHandler:

Expand Down
Empty file added FedPy/TOMO/__init__.py
Empty file.
Binary file added FedPy/TOMO/__pycache__/tomo.cpython-38.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion TOMO/tomo.py → FedPy/TOMO/tomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"""

# Import Modules
from utils.date_handler import DatesHandler as datesHand
from .utils.date_handler import DatesHandler as datesHand
from bs4 import BeautifulSoup as bs
import requests as req

Expand Down
Empty file added FedPy/TOMO/utils/__init__.py
Empty file.
37 changes: 37 additions & 0 deletions FedPy/TOMO/utils/date_handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import datetime as dt

class DatesHandler:

def time():
now = dt.datetime.now()
return now.strftime('%H:%M')

def today():
return dt.datetime.today()

def last_weekday(d,weekday):

if d.weekday() > weekday:
last_week = d - dt.timedelta(days=7)
offset = (last_week.weekday() - weekday) % 7

return last_week - dt.timedelta(days=offset)

else:
offset = (d.weekday() - weekday) % 7

return d - dt.timedelta(days=offset)

def next_weekday(d, weekday):

days_forward = weekday - d.weekday()
if days_forward <= 0:
days_forward += 7

return d + dt.timedelta(days_forward)

def this_weekday(d, weekday):

days_prev = weekday - d.weekday()

return d + dt.timedelta(days_prev)
6 changes: 4 additions & 2 deletions FedWatch.py → FedPy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from SOMA.soma import SOMA
from TOMO.tomo import TOMO
from .SOMA.soma import SOMA
from .TOMO.tomo import TOMO
import pandas as pd

"""
Expand Down Expand Up @@ -78,3 +78,5 @@ def tomo_rrp():
return TOMO.recent_rrp()




Empty file added FedPy/data/__init__.py
Empty file.
File renamed without changes.
7 changes: 7 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2021 Antonio Hickey

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global-include *.txt *.py *.csv
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# FedPy
Python library for all things Federal Reserve related

## _Everything Federal Reserve Related_

[![Build Status](https://travis-ci.com/antonio-hickey/FedPy.svg?branch=main)](https://travis-ci.com/antonio-hickey/FedPy)

Open source python package for seamlessly extracting data
related to Federal Reserve and integrating for your own use.

## Features

- Get current SOMA portfolio value
- Get current SOMA portfolio individual holdings
- Get historic SOMA portfolio value
- Get current TOMO portfolio value

## Installation
Install using pip:


```sh
pip install FedPy
```
Binary file removed TOMO/__pycache__/tomo.cpython-38.pyc
Binary file not shown.
28 changes: 28 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from setuptools import setup, find_packages

classifiers = [
'Development Status :: 2 - Pre-Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
]

setup(
name='FedPy',
version='1.0.1',
description='Seamlessly extract official Federal Reserve data for your own use.',
lang_descrip=open('README.md').read() + '\n\n' + open('CHANGELOG.txt').read(),
url='https://github.com/antonio-hickey/FedPy',
author='Antonio Hickey',
author_email="[email protected]",
license='MIT',
classifiers=classifiers,
keywords=['Federal Reserve', 'Economics', 'Finance'],
packages = find_packages(),
install_requires=[
'beautifulsoup4',
'lxml',
'pandas',
'datetime',
'requests',
],
)

0 comments on commit 174f7c2

Please sign in to comment.