-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from antonio-hickey/TOMO
Repackaged
- Loading branch information
Showing
19 changed files
with
107 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import datetime as dt | ||
import calendar | ||
|
||
class DatesHandler: | ||
|
||
|
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
global-include *.txt *.py *.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
], | ||
) |