Skip to content

Commit

Permalink
Merge pull request #1 from regoawt/release/0.1.0
Browse files Browse the repository at this point in the history
Release/0.1.0
  • Loading branch information
regoawt authored Aug 24, 2022
2 parents f74d931 + b4dadeb commit 0388110
Show file tree
Hide file tree
Showing 12 changed files with 834 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
ignore = E501,W606,W503,F401
4 changes: 2 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: [ "3.8", "3.9", "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
environment: production
needs: default
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
![Build](https://github.com/regoawt/pyrozza/actions/workflows/cicd.yml/badge.svg)
# pyrozza
A Python wrapper for the UK Police API

## Usage
Instantiate the client:
```python
client = pyrozza.Client()
```

Currently, the following methods are available:
```python
client.street_level_crimes(
lat: float = None,
lon: float = None,
poly: List[tuple] = None,
date: str = None,
)
client.street_level_outcomes(
lat: float = None,
lon: float = None,
poly: List[tuple] = None,
location_id: int = None,
date: str = None
)

client.crime_categories(date: str = None)
```

For the geo-related kwargs, only one of the following must be provided:
- `lat` AND `lon`
- `poly`
- `location_id`
Loading

0 comments on commit 0388110

Please sign in to comment.