pyrox-client 0.0.3__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyrox-client
3
+ Version: 0.0.4
4
+ Summary: HYROX race data client – retrieve full race results via Python
5
+ Author: Vlad Matei
6
+ License: MIT
7
+ Requires-Python: >=3.9
8
+ Requires-Dist: fastparquet>=2024.5.0
9
+ Requires-Dist: fsspec>=2024.2.0
10
+ Requires-Dist: pandas>=2.2
11
+ Requires-Dist: platformdirs>=4.2.0
12
+ Requires-Dist: requests>=2.31
13
+ Requires-Dist: s3fs>=2024.2.0
14
+ Provides-Extra: duckdb
15
+ Requires-Dist: duckdb>=1.0.0; extra == 'duckdb'
16
+ Description-Content-Type: text/markdown
17
+
18
+ Package to retrieve Hyrox race data programmatically
19
+
20
+ At the moment, only 3 endpoints -- examples below
21
+
22
+
23
+
24
+ ```commandline
25
+ s6races_info = list_races(season=6) # list available races of season 6
26
+ all_races_info = list_races() # without passing in a season parameter - see all available races in the data warehouse
27
+ s6races_subset = get_season(season=6, locations=['london', 'hamburg']) # get a subset of races from a specified season
28
+ london_season6 = get_race(season=6, location="london") # get a specific race
29
+ hamburg_season6 = get_race(season=6, location="hamburg", division="open", gender="m") # get a specific race, with extra-filtering applied
30
+ ```
@@ -0,0 +1,13 @@
1
+ Package to retrieve Hyrox race data programmatically
2
+
3
+ At the moment, only 3 endpoints -- examples below
4
+
5
+
6
+
7
+ ```commandline
8
+ s6races_info = list_races(season=6) # list available races of season 6
9
+ all_races_info = list_races() # without passing in a season parameter - see all available races in the data warehouse
10
+ s6races_subset = get_season(season=6, locations=['london', 'hamburg']) # get a subset of races from a specified season
11
+ london_season6 = get_race(season=6, location="london") # get a specific race
12
+ hamburg_season6 = get_race(season=6, location="hamburg", division="open", gender="m") # get a specific race, with extra-filtering applied
13
+ ```
@@ -1,6 +1,6 @@
1
1
  from .core import get_race, list_races
2
2
  from .config import set_bucket, set_manifest_path, get_config
3
3
 
4
- __version__ = "0.0.3"
4
+ __version__ = "0.0.4"
5
5
 
6
6
  __all__ = ["get_race", "list_races", "set_bucket", "set_manifest_path", "get_config"]
@@ -1,62 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pyrox-client
3
- Version: 0.0.3
4
- Summary: HYROX race data client – retrieve full race results via Python
5
- Author: Vlad Matei
6
- License: MIT
7
- Requires-Python: >=3.9
8
- Requires-Dist: fastparquet>=2024.5.0
9
- Requires-Dist: fsspec>=2024.2.0
10
- Requires-Dist: pandas>=2.2
11
- Requires-Dist: platformdirs>=4.2.0
12
- Requires-Dist: requests>=2.31
13
- Requires-Dist: s3fs>=2024.2.0
14
- Provides-Extra: duckdb
15
- Requires-Dist: duckdb>=1.0.0; extra == 'duckdb'
16
- Description-Content-Type: text/markdown
17
-
18
- Package to retrieve Hyrox race data programmatically - data
19
- \available in a S3 Bucket
20
- API folder contains the logic for the API
21
-
22
- This is now deployed via fly - from the command line, we can do the below useful commands
23
-
24
- ```
25
- fly auth login (required to login and run from CL)
26
- fly scale count 0 (0 machines allocated to the app)
27
- fly machines list (shows the state of the machine as well - so can now if running or stopped)
28
- fly volumes list -a pyrox-api-proud-surf-3131 (passing the application name)
29
-
30
- fly deploy (if making new changes locally and wanting to deploythe latest version)
31
- ```
32
-
33
-
34
- Running the API via docker
35
- Below mounts the app/api and app/src folders to the image
36
- So any changes are reflected without having to rebuild the container and run again!
37
-
38
- ```
39
- docker run -it --rm -p 8000:8080 \
40
- -v "$PWD/api:/app/api" -v "$PWD/src:/app/src" \
41
- -e PYROX_BUCKET="s3://hyrox-results" -e AWS_REGION="eu-west-1" \
42
- pyrox-api \
43
- python -m uvicorn api.app:app --host 0.0.0.0 --port 8080 --reload
44
- ```
45
-
46
- Command to build the Docker container (ran from repo root)
47
- ```
48
- docker build -f api/Dockerfile -t pyrox-api .
49
- ```
50
-
51
-
52
- The API is used by the client (which is in the src folder) under the pyrox module
53
-
54
- The base URL there is the variable that controls what we are pointing our client to (either the deployed FLY api or a Docker container running locally on port 8000)
55
-
56
-
57
- ```commandline
58
- season6races_info = list_races(season=6)
59
- season6racesdf = get_season(season=6, locations=['london', 'hamburg'])
60
- london_season6 = get_race(season=6, location="london")
61
- hamburg_season6 = get_race(season=6, location="hamburg", division="open", gender="m")
62
- ```
@@ -1,45 +0,0 @@
1
- Package to retrieve Hyrox race data programmatically - data
2
- \available in a S3 Bucket
3
- API folder contains the logic for the API
4
-
5
- This is now deployed via fly - from the command line, we can do the below useful commands
6
-
7
- ```
8
- fly auth login (required to login and run from CL)
9
- fly scale count 0 (0 machines allocated to the app)
10
- fly machines list (shows the state of the machine as well - so can now if running or stopped)
11
- fly volumes list -a pyrox-api-proud-surf-3131 (passing the application name)
12
-
13
- fly deploy (if making new changes locally and wanting to deploythe latest version)
14
- ```
15
-
16
-
17
- Running the API via docker
18
- Below mounts the app/api and app/src folders to the image
19
- So any changes are reflected without having to rebuild the container and run again!
20
-
21
- ```
22
- docker run -it --rm -p 8000:8080 \
23
- -v "$PWD/api:/app/api" -v "$PWD/src:/app/src" \
24
- -e PYROX_BUCKET="s3://hyrox-results" -e AWS_REGION="eu-west-1" \
25
- pyrox-api \
26
- python -m uvicorn api.app:app --host 0.0.0.0 --port 8080 --reload
27
- ```
28
-
29
- Command to build the Docker container (ran from repo root)
30
- ```
31
- docker build -f api/Dockerfile -t pyrox-api .
32
- ```
33
-
34
-
35
- The API is used by the client (which is in the src folder) under the pyrox module
36
-
37
- The base URL there is the variable that controls what we are pointing our client to (either the deployed FLY api or a Docker container running locally on port 8000)
38
-
39
-
40
- ```commandline
41
- season6races_info = list_races(season=6)
42
- season6racesdf = get_season(season=6, locations=['london', 'hamburg'])
43
- london_season6 = get_race(season=6, location="london")
44
- hamburg_season6 = get_race(season=6, location="hamburg", division="open", gender="m")
45
- ```
File without changes