Skip to content

Commit

Permalink
Merge pull request #2 from PitterPatterPython/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
robd518 authored Jul 1, 2024
2 parents bca3605 + edbbe55 commit 185561a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Description
[Provide a brief description of the changes in this PR]

## Related Issue
[If applicable, link to the issue this PR addresses]

## Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?
[Describe the tests that you ran to verify your changes]

## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to PyPI

on:
push:
branches:
- main

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install

- name: Build package
run: poetry build

- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_PUBLISH }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish
3 changes: 1 addition & 2 deletions connectors/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ def make_request(
headers: Dict[str, str] = None,
params: Dict[str, Any] = None,
data: Dict[str, Any] = None,
json: Dict[str, Any] = None,
multiplexed: bool = False
json: Dict[str, Any] = None
) -> niquests.Response:
"""_summary_
Expand Down
9 changes: 2 additions & 7 deletions connectors/spycloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'.env.sample file to .env and set your values?')


def sip_cookie_domains(cookie_domains: str, **kwargs: Dict[str, Any]) -> Dict:
def sip_cookie_domains(cookie_domains: str, **kwargs: Dict[str, Any]) -> Response:
method: str = 'get'
url: str = f'https://api.spycloud.io/sip-v1/breach/data/cookie-domains/{cookie_domains}'
headers: Dict = {
Expand All @@ -22,9 +22,4 @@ def sip_cookie_domains(cookie_domains: str, **kwargs: Dict[str, Any]) -> Dict:

result: Response = make_request(method=method, url=url, headers=headers, params=params)

print(result.status_code)
print(result.content)


if __name__ == '__main__':
sip_cookie_domains('wellsfargo.com', since="2024-04-24")
return result

0 comments on commit 185561a

Please sign in to comment.