ffbb-api-client-v2 1.0__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.
Files changed (135) hide show
  1. ffbb_api_client_v2-1.0/.coveragerc +28 -0
  2. ffbb_api_client_v2-1.0/.github/workflows/ci.yml +125 -0
  3. ffbb_api_client_v2-1.0/.gitignore +56 -0
  4. ffbb_api_client_v2-1.0/.isort.cfg +3 -0
  5. ffbb_api_client_v2-1.0/.pre-commit-config.yaml +67 -0
  6. ffbb_api_client_v2-1.0/.readthedocs.yml +27 -0
  7. ffbb_api_client_v2-1.0/AUTHORS.rst +5 -0
  8. ffbb_api_client_v2-1.0/CHANGELOG.rst +8 -0
  9. ffbb_api_client_v2-1.0/LICENSE.txt +201 -0
  10. ffbb_api_client_v2-1.0/PKG-INFO +145 -0
  11. ffbb_api_client_v2-1.0/README.rst +120 -0
  12. ffbb_api_client_v2-1.0/docs/Makefile +29 -0
  13. ffbb_api_client_v2-1.0/docs/_static/.gitignore +1 -0
  14. ffbb_api_client_v2-1.0/docs/authors.rst +2 -0
  15. ffbb_api_client_v2-1.0/docs/changelog.rst +2 -0
  16. ffbb_api_client_v2-1.0/docs/conf.py +286 -0
  17. ffbb_api_client_v2-1.0/docs/contributing.rst +1 -0
  18. ffbb_api_client_v2-1.0/docs/index.rst +60 -0
  19. ffbb_api_client_v2-1.0/docs/license.rst +7 -0
  20. ffbb_api_client_v2-1.0/docs/readme.rst +2 -0
  21. ffbb_api_client_v2-1.0/docs/requirements.txt +8 -0
  22. ffbb_api_client_v2-1.0/playground.py +12 -0
  23. ffbb_api_client_v2-1.0/pyproject.toml +9 -0
  24. ffbb_api_client_v2-1.0/quick_start.py +51 -0
  25. ffbb_api_client_v2-1.0/setup.cfg +79 -0
  26. ffbb_api_client_v2-1.0/setup.py +22 -0
  27. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Affiche.py +34 -0
  28. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Cartographie.py +120 -0
  29. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Categorie.py +60 -0
  30. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Code.py +7 -0
  31. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Commune.py +95 -0
  32. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionID.py +170 -0
  33. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionIDCategorie.py +34 -0
  34. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionIDSexe.py +34 -0
  35. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionIDTypeCompetition.py +27 -0
  36. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionIDTypeCompetitionGenerique.py +27 -0
  37. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionOrigine.py +86 -0
  38. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionOrigineCategorie.py +22 -0
  39. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionOrigineTypeCompetition.py +14 -0
  40. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CompetitionOrigineTypeCompetitionGenerique.py +25 -0
  41. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Coordonnees.py +31 -0
  42. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/CoordonneesType.py +5 -0
  43. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/DocumentFlyer.py +243 -0
  44. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/DocumentFlyerType.py +6 -0
  45. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Etat.py +6 -0
  46. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/FacetDistribution.py +12 -0
  47. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/FacetStats.py +12 -0
  48. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Folder.py +28 -0
  49. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Geo.py +27 -0
  50. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/GradientColor.py +27 -0
  51. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Hit.py +16 -0
  52. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/IDEngagementEquipe.py +33 -0
  53. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/IDOrganismeEquipe.py +60 -0
  54. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/IDOrganismeEquipe1Logo.py +30 -0
  55. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/IDPoule.py +27 -0
  56. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Jour.py +11 -0
  57. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Label.py +15 -0
  58. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Labellisation.py +37 -0
  59. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultCompetitions.py +25 -0
  60. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultOrganismes.py +23 -0
  61. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultPratiques.py +23 -0
  62. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultRencontres.py +23 -0
  63. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultSalles.py +23 -0
  64. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultTerrains.py +23 -0
  65. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResultTournois.py +23 -0
  66. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/MultiSearchResults.py +81 -0
  67. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/NatureSol.py +68 -0
  68. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Niveau.py +9 -0
  69. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/NiveauClass.py +29 -0
  70. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/NiveauEnum.py +8 -0
  71. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Objectif.py +7 -0
  72. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Organisateur.py +310 -0
  73. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/OrganisateurType.py +6 -0
  74. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/OrganismeIDPere.py +279 -0
  75. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/PhaseCode.py +20 -0
  76. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Poule.py +44 -0
  77. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Pratique.py +5 -0
  78. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/PublicationInternet.py +6 -0
  79. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/PurpleLogo.py +23 -0
  80. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Saison.py +22 -0
  81. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Sexe.py +26 -0
  82. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Source.py +5 -0
  83. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/Status.py +5 -0
  84. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TeamEngagement.py +63 -0
  85. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TournoiTypeClass.py +41 -0
  86. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TournoiTypeEnum.py +7 -0
  87. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeAssociation.py +22 -0
  88. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeAssociationLibelle.py +33 -0
  89. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeClass.py +22 -0
  90. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeCompetition.py +8 -0
  91. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeCompetitionGenerique.py +32 -0
  92. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeEnum.py +7 -0
  93. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/TypeLeague.py +6 -0
  94. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/__init__.py +52 -0
  95. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/api_ffbb_app_client.py +60 -0
  96. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/competition_type.py +29 -0
  97. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/converters.py +126 -0
  98. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/external_id.py +164 -0
  99. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/ffbb_api_client_v2.py +194 -0
  100. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/from_dict.py +0 -0
  101. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/http_requests_helper.py +50 -0
  102. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/http_requests_utils.py +205 -0
  103. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/lives.py +347 -0
  104. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/logo.py +30 -0
  105. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/meilisearch_client.py +61 -0
  106. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/meilisearch_client_extension.py +64 -0
  107. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/meilisearch_ffbb_client.py +15 -0
  108. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_queries.py +37 -0
  109. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_query.py +375 -0
  110. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_query_helper.py +23 -0
  111. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_competitions.py +476 -0
  112. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_organismes.py +358 -0
  113. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_pratiques.py +843 -0
  114. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_rencontres.py +523 -0
  115. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_salles.py +224 -0
  116. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_terrains.py +618 -0
  117. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_result_tournois.py +285 -0
  118. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/multi_search_results.py +122 -0
  119. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2/salle.py +65 -0
  120. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2.egg-info/PKG-INFO +145 -0
  121. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2.egg-info/SOURCES.txt +134 -0
  122. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2.egg-info/dependency_links.txt +1 -0
  123. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2.egg-info/not-zip-safe +1 -0
  124. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2.egg-info/requires.txt +13 -0
  125. ffbb_api_client_v2-1.0/src/ffbb_api_client_v2.egg-info/top_level.txt +1 -0
  126. ffbb_api_client_v2-1.0/tests/conftest.py +10 -0
  127. ffbb_api_client_v2-1.0/tests/test_00_api_ffbb_app_client.py +24 -0
  128. ffbb_api_client_v2-1.0/tests/test_01_meilisearch_client.py +47 -0
  129. ffbb_api_client_v2-1.0/tests/test_02_meilisearch_client_extension.py +78 -0
  130. ffbb_api_client_v2-1.0/tests/test_03_ffbb_api_client_v2.py +257 -0
  131. ffbb_api_client_v2-1.0/tests.playground.api_ffbb_app_client.py +17 -0
  132. ffbb_api_client_v2-1.0/tests.playground.meilisearch_ffbb_app_client.py +16 -0
  133. ffbb_api_client_v2-1.0/tests.playground.meilisearch_ffbb_app_client_helper.py +54 -0
  134. ffbb_api_client_v2-1.0/tox.health-check.sh +1 -0
  135. ffbb_api_client_v2-1.0/tox.ini +102 -0
@@ -0,0 +1,28 @@
1
+ # .coveragerc to control coverage.py
2
+ [run]
3
+ branch = True
4
+ source = ffbb_api_client_v2
5
+ # omit = bad_file.py
6
+
7
+ [paths]
8
+ source =
9
+ src/
10
+ */site-packages/
11
+
12
+ [report]
13
+ # Regexes for lines to exclude from consideration
14
+ exclude_lines =
15
+ # Have to re-enable the standard pragma
16
+ pragma: no cover
17
+
18
+ # Don't complain about missing debug-only code:
19
+ def __repr__
20
+ if self\.debug
21
+
22
+ # Don't complain if tests don't hit defensive assertion code:
23
+ raise AssertionError
24
+ raise NotImplementedError
25
+
26
+ # Don't complain if non-runnable code isn't run:
27
+ if 0:
28
+ if __name__ == .__main__.:
@@ -0,0 +1,125 @@
1
+ # GitHub Actions configuration **EXAMPLE**,
2
+ # MODIFY IT ACCORDING TO YOUR NEEDS!
3
+ # Reference: https://docs.github.com/en/actions
4
+
5
+ name: tests
6
+
7
+ on:
8
+ push:
9
+ # Avoid using all the resources/limits available by checking only
10
+ # relevant branches and tags. Other branches can be checked via PRs.
11
+ # branches: [main]
12
+ tags: ['v[0-9]*', '[0-9]+.[0-9]+*'] # Match tags that resemble a version
13
+ pull_request: # Run in every PR
14
+ workflow_dispatch: # Allow manually triggering the workflow
15
+ schedule:
16
+ # Run roughly every 15 days at 00:00 UTC
17
+ # (useful to check if updates on dependencies break the package)
18
+ - cron: '0 0 1,16 * *'
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ concurrency:
24
+ group: >-
25
+ ${{ github.workflow }}-${{ github.ref_type }}-
26
+ ${{ github.event.pull_request.number || github.sha }}
27
+ cancel-in-progress: true
28
+
29
+ jobs:
30
+ prepare:
31
+ runs-on: ubuntu-latest
32
+ outputs:
33
+ wheel-distribution: ${{ steps.wheel-distribution.outputs.path }}
34
+ steps:
35
+ - uses: actions/checkout@v3
36
+ with: {fetch-depth: 0} # deep clone for setuptools-scm
37
+ - uses: actions/setup-python@v4
38
+ id: setup-python
39
+ with: {python-version: "3.11"}
40
+ - name: Run static analysis and format checkers
41
+ run: pipx run pre-commit run --all-files --show-diff-on-failure
42
+ - name: Build package distribution files
43
+ run: >-
44
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
45
+ tox -e clean,build
46
+ - name: Record the path of wheel distribution
47
+ id: wheel-distribution
48
+ run: echo "path=$(ls dist/*.whl)" >> $GITHUB_OUTPUT
49
+ - name: Store the distribution files for use in other stages
50
+ # `tests` and `publish` will use the same pre-built distributions,
51
+ # so we make sure to release the exact same package that was tested
52
+ uses: actions/upload-artifact@v3
53
+ with:
54
+ name: python-distribution-files
55
+ path: dist/
56
+ retention-days: 1
57
+
58
+ test:
59
+ needs: prepare
60
+ strategy:
61
+ matrix:
62
+ python:
63
+ - "3.8"
64
+ platform:
65
+ - ubuntu-latest
66
+ runs-on: ${{ matrix.platform }}
67
+ steps:
68
+ - uses: actions/checkout@v3
69
+ - uses: actions/setup-python@v4
70
+ id: setup-python
71
+ with:
72
+ python-version: ${{ matrix.python }}
73
+ - name: Retrieve pre-built distribution files
74
+ uses: actions/download-artifact@v3
75
+ with: {name: python-distribution-files, path: dist/}
76
+ - name: Run tests
77
+ env:
78
+ API_TOKEN: ${{ secrets.API_TOKEN }}
79
+ MEILISEARCH_TOKEN: ${{ secrets.MEILISEARCH_TOKEN }}
80
+ run: >-
81
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
82
+ tox --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
83
+ -- -rFEx --durations 10 --color yes # pytest args
84
+ - name: Generate coverage report
85
+ run: pipx run coverage lcov -o coverage.lcov
86
+ - name: Upload partial coverage report
87
+ uses: coverallsapp/github-action@master
88
+ with:
89
+ path-to-lcov: coverage.lcov
90
+ github-token: ${{ secrets.GITHUB_TOKEN }}
91
+ flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
92
+ parallel: true
93
+
94
+ finalize:
95
+ needs: test
96
+ runs-on: ubuntu-latest
97
+ steps:
98
+ - name: Finalize coverage report
99
+ uses: coverallsapp/github-action@master
100
+ with:
101
+ github-token: ${{ secrets.GITHUB_TOKEN }}
102
+ parallel-finished: true
103
+
104
+ publish:
105
+ needs: finalize
106
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
107
+ runs-on: ubuntu-latest
108
+ permissions:
109
+ contents: write
110
+ steps:
111
+ - uses: actions/checkout@v3
112
+ - uses: actions/setup-python@v4
113
+ with: {python-version: "3.11"}
114
+ - name: Retrieve pre-built distribution files
115
+ uses: actions/download-artifact@v3
116
+ with: {name: python-distribution-files, path: dist/}
117
+ - name: Publish Package
118
+ env:
119
+ # TODO: Set your PYPI_TOKEN as a secret using GitHub UI
120
+ # - https://pypi.org/help/#apitoken
121
+ # - https://docs.github.com/en/actions/security-guides/encrypted-secrets
122
+ TWINE_REPOSITORY: pypi
123
+ TWINE_USERNAME: __token__
124
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
125
+ run: pipx run tox -e publish
@@ -0,0 +1,56 @@
1
+ # Temporary and binary files
2
+ *~
3
+ *.py[cod]
4
+ *.so
5
+ *.cfg
6
+ !.isort.cfg
7
+ !setup.cfg
8
+ *.orig
9
+ *.log
10
+ *.pot
11
+ __pycache__/*
12
+ .cache/*
13
+ .*.swp
14
+ */.ipynb_checkpoints/*
15
+ .DS_Store
16
+
17
+ # Project files
18
+ .ropeproject
19
+ .project
20
+ .pydevproject
21
+ .settings
22
+ .idea
23
+ .vscode
24
+ tags
25
+
26
+ # Package files
27
+ *.egg
28
+ *.eggs/
29
+ .installed.cfg
30
+ *.egg-info
31
+
32
+ # Unittest and coverage
33
+ htmlcov/*
34
+ .coverage
35
+ .coverage.*
36
+ .tox
37
+ junit*.xml
38
+ coverage.xml
39
+ .pytest_cache/
40
+
41
+ # Build and docs folder/files
42
+ build/*
43
+ dist/*
44
+ sdist/*
45
+ docs/api/*
46
+ docs/_rst/*
47
+ docs/_build/*
48
+ cover/*
49
+ MANIFEST
50
+
51
+ # Per-project virtualenvs
52
+ .venv*/
53
+ .conda*/
54
+ .python-version
55
+ .env
56
+ http_cache.sqlite
@@ -0,0 +1,3 @@
1
+ [settings]
2
+ profile = black
3
+ known_first_party = ffbb_api_client_v2
@@ -0,0 +1,67 @@
1
+ exclude: '^docs/conf.py'
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v4.5.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: check-added-large-files
9
+ - id: check-ast
10
+ - id: check-json
11
+ - id: check-merge-conflict
12
+ - id: check-xml
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+ - id: end-of-file-fixer
16
+ - id: requirements-txt-fixer
17
+ - id: mixed-line-ending
18
+ args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
+
20
+ # If you want to automatically "modernize" your Python code:
21
+ - repo: https://github.com/asottile/pyupgrade
22
+ rev: v3.15.0
23
+ hooks:
24
+ - id: pyupgrade
25
+ args: ['--py37-plus']
26
+
27
+ # If you want to avoid flake8 errors due to unused vars or imports:
28
+ - repo: https://github.com/PyCQA/autoflake
29
+ rev: v2.2.1
30
+ hooks:
31
+ - id: autoflake
32
+ args: [
33
+ --in-place,
34
+ --remove-all-unused-imports,
35
+ --remove-unused-variables,
36
+ ]
37
+
38
+ - repo: https://github.com/PyCQA/isort
39
+ rev: 5.13.2
40
+ hooks:
41
+ - id: isort
42
+
43
+ - repo: https://github.com/psf/black
44
+ rev: 24.1.1
45
+ hooks:
46
+ - id: black
47
+ language_version: python3
48
+
49
+ ## If like to embrace black styles even in the docs:
50
+ # - repo: https://github.com/asottile/blacken-docs
51
+ # rev: v1.13.0
52
+ # hooks:
53
+ # - id: blacken-docs
54
+ # additional_dependencies: [black]
55
+
56
+ - repo: https://github.com/PyCQA/flake8
57
+ rev: 7.0.0
58
+ hooks:
59
+ - id: flake8
60
+ ## You can add flake8 plugins via `additional_dependencies`:
61
+ # additional_dependencies: [flake8-bugbear]
62
+
63
+ # Check for misspells in documentation files:
64
+ # - repo: https://github.com/codespell-project/codespell
65
+ # rev: v2.2.5
66
+ # hooks:
67
+ # - id: codespell
@@ -0,0 +1,27 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Build documentation in the docs/ directory with Sphinx
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ # Build documentation with MkDocs
12
+ #mkdocs:
13
+ # configuration: mkdocs.yml
14
+
15
+ # Optionally build your docs in additional formats such as PDF
16
+ formats:
17
+ - pdf
18
+
19
+ build:
20
+ os: ubuntu-22.04
21
+ tools:
22
+ python: "3.11"
23
+
24
+ python:
25
+ install:
26
+ - requirements: docs/requirements.txt
27
+ - {path: ., method: pip}
@@ -0,0 +1,5 @@
1
+ ============
2
+ Contributors
3
+ ============
4
+
5
+ * Rinzler78 <Borisleclere@gmail.com>
@@ -0,0 +1,8 @@
1
+ =========
2
+ Changelog
3
+ =========
4
+
5
+ Version 0.0.1
6
+ ===========
7
+
8
+ - Welcome
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.1
2
+ Name: ffbb_api_client_v2
3
+ Version: 1.0
4
+ Summary: Allow to interact with the new FFBB apis
5
+ Home-page: https://github.com/Rinzler78/FFBBApiClientV2_Python
6
+ Author: Rinzler78
7
+ Author-email: Borisleclere@gmail.com
8
+ License: Apache-2.0
9
+ Project-URL: Documentation, https://pyscaffold.org/
10
+ Platform: any
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Description-Content-Type: text/x-rst; charset=UTF-8
14
+ License-File: LICENSE.txt
15
+ Requires-Dist: importlib-metadata; python_version < "3.8"
16
+ Requires-Dist: requests
17
+ Requires-Dist: python-dotenv
18
+ Requires-Dist: readme_renderer
19
+ Requires-Dist: python-dateutil
20
+ Requires-Dist: requests_cache
21
+ Provides-Extra: testing
22
+ Requires-Dist: setuptools; extra == "testing"
23
+ Requires-Dist: pytest; extra == "testing"
24
+ Requires-Dist: pytest-cov; extra == "testing"
25
+
26
+ .. These are examples of badges you might want to add to your README:
27
+ please update the URLs accordingly
28
+
29
+ .. image:: https://api.cirrus-ci.com/github/<USER>/FFBBApiClientV2_Python.svg?branch=main
30
+ :alt: Built Status
31
+ :target: https://cirrus-ci.com/github/<USER>/FFBBApiClientV2_Python
32
+ .. image:: https://readthedocs.org/projects/FFBBApiClientV2_Python/badge/?version=latest
33
+ :alt: ReadTheDocs
34
+ :target: https://FFBBApiClientV2_Python.readthedocs.io/en/stable/
35
+ .. image:: https://img.shields.io/coveralls/github/<USER>/FFBBApiClientV2_Python/main.svg
36
+ :alt: Coveralls
37
+ :target: https://coveralls.io/r/<USER>/FFBBApiClientV2_Python
38
+ .. image:: https://img.shields.io/pypi/v/FFBBApiClientV2_Python.svg
39
+ :alt: PyPI-Server
40
+ :target: https://pypi.org/project/FFBBApiClientV2_Python/
41
+ .. image:: https://img.shields.io/conda/vn/conda-forge/FFBBApiClientV2_Python.svg
42
+ :alt: Conda-Forge
43
+ :target: https://anaconda.org/conda-forge/FFBBApiClientV2_Python
44
+ .. image:: https://pepy.tech/badge/FFBBApiClientV2_Python/month
45
+ :alt: Monthly Downloads
46
+ :target: https://pepy.tech/project/FFBBApiClientV2_Python
47
+ .. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter
48
+ :alt: Twitter
49
+ :target: https://twitter.com/FFBBApiClientV2_Python
50
+ .. image:: https://img.shields.io/pypi/v/ffbb_api_client_v2.svg
51
+ :alt: PyPI-Server
52
+ :target: https://pypi.org/project/ffbb_api_client_v2/
53
+
54
+ .. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
55
+ :alt: Project generated with PyScaffold
56
+ :target: https://pyscaffold.org/
57
+
58
+ |
59
+
60
+ ======================
61
+ FFBBApiClientV2_Python
62
+ ======================
63
+
64
+
65
+ Allow to interact with the new FFBB apis
66
+
67
+
68
+ ffbb_api_client_v2 allow to interact with the new FFBB api.
69
+ You can retrieve information about clubs, teams, matches, etc...
70
+
71
+
72
+ Installation
73
+ ============
74
+
75
+ .. code-block:: bash
76
+
77
+ pip install ffbb_api_client_v2
78
+
79
+ Quick start
80
+ ===========
81
+
82
+ .. code-block:: python
83
+
84
+ import os
85
+ from ffbb_api_client_v2 import FFBBAPIClientV2
86
+
87
+ # Load env from file if needed
88
+ # from dotenv import load_dotenv
89
+ # load_dotenv()
90
+
91
+ # Retrieve apis bearer tokens
92
+ MEILISEARCH_TOKEN = os.getenv("MEILISEARCH_TOKEN")
93
+ API_TOKEN = os.getenv("API_TOKEN")
94
+
95
+ # Create an instance of the api client
96
+ ffbb_api_client = FFBBAPIClientV2.create(MEILISEARCH_TOKEN, API_TOKEN)
97
+
98
+ # Get the lives
99
+ lives = ffbb_api_client.get_lives()
100
+
101
+ # Get the organismes
102
+ organismes = ffbb_api_client.search_organismes("Paris")
103
+
104
+ # Get the rencontres
105
+ rencontres = ffbb_api_client.search_rencontres("Basket")
106
+
107
+ # Get the terrains
108
+ terrains = ffbb_api_client.search_terrains("Basket")
109
+
110
+ # Get the competitions
111
+ competitions = ffbb_api_client.search_competitions("Basket")
112
+
113
+ # Get the salles
114
+ salles = ffbb_api_client.search_salles("Basket")
115
+
116
+ # Get pratiques
117
+ pratiques = ffbb_api_client.search_pratiques("Basket")
118
+
119
+ # Get tournois
120
+ tournois = ffbb_api_client.search_tournois("Basket")
121
+
122
+ Examples
123
+ ========
124
+
125
+ Take a look at quick_start.py to see how to use the library.
126
+
127
+ Note
128
+ ====
129
+
130
+ This project has been set up using PyScaffold 4.5. For details and usage
131
+ information on PyScaffold see https://pyscaffold.org/.
132
+
133
+ Licence
134
+ =======
135
+
136
+ ffbb_api_client_v2 is distributed under the Apache 2.0 license.
137
+
138
+ Dev notes
139
+ =========
140
+
141
+ Command used to create this project:
142
+
143
+ .. code-block:: bash
144
+
145
+ putup FFBBApiClientV2_Python -p ffbb_api_client_v2 -l Apache-2.0 -d "Allow to interact with the new FFBB apis" -u "https://github.com/Rinzler78/FFBBApiClientV2_Python" -v --github-actions --venv .venv