Skip to content

Commit ebc2f73

Browse files
committed
added pypi publishing through github actions take 1
1 parent 11e0b59 commit ebc2f73

File tree

4 files changed

+84
-21
lines changed

4 files changed

+84
-21
lines changed

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This workflow will upload a Python Package using Trusted Publishing when a release is created
2+
# For more information see: https://docs.pypi.org/trusted-publishers/
3+
4+
name: Publish CFL SDK 📦 to PyPI
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
build:
12+
name: Build distribution 📦
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout source
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.x"
23+
24+
- name: Install Poetry
25+
run: |
26+
curl -sSL https://install.python-poetry.org | python3 -
27+
echo "$HOME/.local/bin" >> $GITHUB_PATH
28+
29+
- name: Configure Poetry
30+
run: |
31+
poetry config virtualenvs.create false
32+
33+
- name: Install dependencies and build
34+
run: |
35+
poetry install
36+
poetry build
37+
38+
- name: Store the distribution packages
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: python-package-distributions
42+
path: dist/
43+
44+
publish-to-pypi:
45+
name: Publish Python 🐍 distribution 📦 to PyPI
46+
needs:
47+
- build
48+
runs-on: ubuntu-latest
49+
50+
environment:
51+
name: release
52+
url: https://pypi.org/p/cfl-sdk
53+
54+
permissions:
55+
id-token: write # IMPORTANT: mandatory for trusted publishing
56+
57+
steps:
58+
- name: Download all the dists
59+
uses: actions/download-artifact@v4
60+
with:
61+
name: python-package-distributions
62+
path: dist/
63+
64+
- name: Publish distribution 📦 to PyPI
65+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ A modern Python SDK for the **[Canadian Football League](https://www.cfl.ca/)**
1212

1313
## Installation
1414

15-
### From GitHub (current)
16-
1715
```bash
18-
pip install git+https://github.com/ojadeyemi/cfl-sdk.git
16+
pip install cfl-sdk
1917
```
2018

2119
### With Poetry
2220

2321
```bash
24-
poetry add git+https://github.com/ojadeyemi/cfl-sdk.git
22+
poetry add cfl-sdk
2523
```
2624

2725
## Quick Start
@@ -69,8 +67,8 @@ venue = client.get_venue(venue_id=1)
6967
### Seasons
7068

7169
```python
72-
# Get all seasons
73-
seasons = client.get_seasons()
70+
# Get all seasons (with optional pagination)
71+
seasons = client.get_seasons(page=1, limit=50)
7472

7573
# Get specific season
7674
season = client.get_season(season_id=34) # 2025 season
@@ -79,11 +77,11 @@ season = client.get_season(season_id=34) # 2025 season
7977
### Fixtures (Games)
8078

8179
```python
82-
# Get all fixtures
83-
fixtures = client.get_fixtures()
80+
# Get all fixtures (with optional pagination)
81+
fixtures = client.get_fixtures(page=1, limit=50)
8482

8583
# Get fixtures for a season
86-
fixtures = client.get_fixtures(season_id=34) # 2025 season
84+
fixtures = client.get_fixtures(season_id=34, page=1, limit=50) # 2025 season
8785
```
8886

8987
### Rosters
@@ -119,8 +117,8 @@ team_stat = client.get_team_stat(team_stats_id=122345)
119117
### Player Stats
120118

121119
```python
122-
# Get player stats
123-
player_stats = client.get_player_stats()
120+
# Get player stats (with optional pagination and season filter)
121+
player_stats = client.get_player_stats(season_id=34, page=1, limit=50)
124122

125123
# Get specific player stats
126124
player_stat = client.get_player_stat(player_stats_id=1629968)

poetry.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
2-
name = "cfl"
3-
version = "0.1.0"
4-
description = "SDK for CFL API"
2+
name = "cfl-sdk"
3+
version = "0.0.1"
4+
description = "Python SDK for the Canadian Football League (CFL) API"
55
authors = [{ name = "OJ Adeyemi", email = "ojieadeyemi@gmail.com" }]
66
readme = "README.md"
77
license = { file = "LICENSE" }

0 commit comments

Comments
 (0)