bridgemate-dataconnector-client 1.0.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.
- bridgemate_dataconnector_client-1.0.0/.github/workflows/ci.yml +32 -0
- bridgemate_dataconnector_client-1.0.0/.github/workflows/release.yml +54 -0
- bridgemate_dataconnector_client-1.0.0/.gitignore +7 -0
- bridgemate_dataconnector_client-1.0.0/.vscode/extensions.json +6 -0
- bridgemate_dataconnector_client-1.0.0/.vscode/launch.json +30 -0
- bridgemate_dataconnector_client-1.0.0/.vscode/settings.json +5 -0
- bridgemate_dataconnector_client-1.0.0/.vscode/tasks.json +16 -0
- bridgemate_dataconnector_client-1.0.0/CONTRIBUTING.md +12 -0
- bridgemate_dataconnector_client-1.0.0/LICENSE +165 -0
- bridgemate_dataconnector_client-1.0.0/PKG-INFO +166 -0
- bridgemate_dataconnector_client-1.0.0/README.md +145 -0
- bridgemate_dataconnector_client-1.0.0/SUPPORT.md +12 -0
- bridgemate_dataconnector_client-1.0.0/examples/data/init-template.json +55 -0
- bridgemate_dataconnector_client-1.0.0/examples/data/players.json +10 -0
- bridgemate_dataconnector_client-1.0.0/examples/getting_started.py +345 -0
- bridgemate_dataconnector_client-1.0.0/examples/support/echo_transport.py +45 -0
- bridgemate_dataconnector_client-1.0.0/pyproject.toml +35 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/__init__.py +25 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/client.py +431 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/__init__.py +114 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/_support.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_contract_representation_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_enter_handrecord_when_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_name_source.py +21 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_number_validation_option.py +23 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_pair_number_entry_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_point_score_perspective_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_result_entry_method.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_results_overview_option.py +25 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_show_player_names_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_show_ranking_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm2_summary_point_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_confirm_np_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_connection_mode_option.py +22 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_enter_handrecord_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_language_option.py +35 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_lead_card_entry_option.py +23 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_next_round_seating_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_player_number_mandatory_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_player_registration_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_player_registration_option_during_play.py +18 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_player_view_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_ranking_display_option.py +21 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_result_entry_method.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_result_reentry_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_score_column_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_score_recap_option.py +19 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_session_summary_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_starting_positions_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_td_call_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_view_handrecord_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_view_percentages_option.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bm3_view_results_option.py +21 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bridgemate2_settings_dto.py +296 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bridgemate3_settings_dto.py +196 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/bridgemate_settings_dto.py +17 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/continue_dto.py +46 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/data_connector_response_data.py +65 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/error_type.py +44 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/handrecord_dto.py +246 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/init_dto.py +120 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/participation_dto.py +89 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/player_data_dto.py +58 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/result_dto.py +217 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/round_dto.py +102 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/scoring_group_dto.py +118 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/scoring_program_data_connector_commands.py +105 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/scoring_program_request.py +50 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/scoring_program_response.py +57 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/section_dto.py +116 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/section_update_dto.py +137 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/session_dto.py +89 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/table_direction.py +23 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/table_dto.py +66 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/dto/td_call_dto.py +71 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/http_transport.py +25 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/py.typed +0 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/transport_exception.py +13 -0
- bridgemate_dataconnector_client-1.0.0/src/bridgemate_dataconnector/urllib_transport.py +49 -0
- bridgemate_dataconnector_client-1.0.0/tests/__init__.py +0 -0
- bridgemate_dataconnector_client-1.0.0/tests/fake_transport.py +27 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/AcceptHandrecordQueueItems.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/AcceptParticipantQueueItems.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/AcceptPlayerDataQueueItems.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/AcceptResultQueueItems.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/AcceptTdCallQueueItems.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/ContinueEvent.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/InitializeEvent.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/Ping.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForAllHandrecords.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForAllParticipations.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForAllPlayerData.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForAllResults.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForAllTdCalls.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForNewHandrecords.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForNewParticipations.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForNewPlayerData.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForNewResults.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PollQueueForNewTdCalls.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutBridgemate2Settings.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutBridgemate3Settings.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutHandrecords.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutParticipations.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutPlayerData.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutResults.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/PutTdCalls.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/UpdateMovement.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/requests/UpdateScoringGroups.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/AcceptResultQueueItems.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/Error.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/InitializeEvent.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/Ping.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/PollQueueForNewHandrecords.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/PollQueueForNewParticipations.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/PollQueueForNewPlayerData.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/PollQueueForNewResults.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/fixtures/responses/PollQueueForNewTdCalls.json +1 -0
- bridgemate_dataconnector_client-1.0.0/tests/test_data_connector_client.py +134 -0
- bridgemate_dataconnector_client-1.0.0/tests/test_fixture_round_trip.py +114 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest]
|
|
14
|
+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
15
|
+
include:
|
|
16
|
+
# One Windows job: the product's primary OS, and the only place the winreg
|
|
17
|
+
# port-discovery import path gets exercised.
|
|
18
|
+
- os: windows-latest
|
|
19
|
+
python: "3.12"
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python }}
|
|
27
|
+
|
|
28
|
+
- name: Install
|
|
29
|
+
run: pip install -e ".[dev]"
|
|
30
|
+
|
|
31
|
+
- name: Test
|
|
32
|
+
run: python -m pytest
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishes the package to PyPI and creates the git tag and GitHub release.
|
|
4
|
+
#
|
|
5
|
+
# PyPI authentication uses Trusted Publishing (OIDC) — no token secrets. One-time setup on
|
|
6
|
+
# pypi.org: add a (pending) publisher for project bridgemate-dataconnector-client with
|
|
7
|
+
# owner BridgeSystems, repository Bridgemate-Data-Connector-Scoring-Program-Client-Python,
|
|
8
|
+
# workflow release.yml.
|
|
9
|
+
on:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
version:
|
|
13
|
+
description: 'Version to release (semver, without the v prefix), e.g. 1.0.0'
|
|
14
|
+
required: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
release:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
permissions:
|
|
20
|
+
contents: write
|
|
21
|
+
id-token: write
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
- name: Check the version matches pyproject.toml
|
|
30
|
+
run: |
|
|
31
|
+
grep -Fq "version = \"${{ inputs.version }}\"" pyproject.toml \
|
|
32
|
+
|| { echo "pyproject.toml does not carry version ${{ inputs.version }}; bump it first."; exit 1; }
|
|
33
|
+
|
|
34
|
+
- name: Build sdist and wheel
|
|
35
|
+
run: |
|
|
36
|
+
pip install build
|
|
37
|
+
python -m build
|
|
38
|
+
|
|
39
|
+
- name: Test the built wheel
|
|
40
|
+
run: |
|
|
41
|
+
pip install pytest dist/*.whl
|
|
42
|
+
python -m pytest
|
|
43
|
+
|
|
44
|
+
- name: Publish to PyPI
|
|
45
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
46
|
+
|
|
47
|
+
- name: Create tag and release
|
|
48
|
+
env:
|
|
49
|
+
GH_TOKEN: ${{ github.token }}
|
|
50
|
+
run: |
|
|
51
|
+
gh release create "v${{ inputs.version }}" \
|
|
52
|
+
--target "${{ github.sha }}" \
|
|
53
|
+
--title "v${{ inputs.version }}" \
|
|
54
|
+
--generate-notes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Python: getting started (interactive)",
|
|
6
|
+
"type": "debugpy",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"program": "${workspaceFolder}/examples/getting_started.py",
|
|
9
|
+
"console": "integratedTerminal",
|
|
10
|
+
"cwd": "${workspaceFolder}"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Python: getting started (--scenario)",
|
|
14
|
+
"type": "debugpy",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"program": "${workspaceFolder}/examples/getting_started.py",
|
|
17
|
+
"args": ["--scenario"],
|
|
18
|
+
"console": "integratedTerminal",
|
|
19
|
+
"cwd": "${workspaceFolder}"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Python: run tests (pytest)",
|
|
23
|
+
"type": "debugpy",
|
|
24
|
+
"request": "launch",
|
|
25
|
+
"module": "pytest",
|
|
26
|
+
"console": "integratedTerminal",
|
|
27
|
+
"cwd": "${workspaceFolder}"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"label": "pytest",
|
|
6
|
+
"type": "shell",
|
|
7
|
+
"command": "${workspaceFolder}/.venv/Scripts/python.exe",
|
|
8
|
+
"args": ["-m", "pytest"],
|
|
9
|
+
"group": {
|
|
10
|
+
"kind": "test",
|
|
11
|
+
"isDefault": true
|
|
12
|
+
},
|
|
13
|
+
"problemMatcher": []
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest. This repository is maintained by Bridge Systems BV.
|
|
4
|
+
|
|
5
|
+
- **Issues are welcome** — bug reports, documentation gaps, wire-format mismatches.
|
|
6
|
+
- **Pull requests by prior agreement only** — please open an issue or a discussion first.
|
|
7
|
+
- **Never edit `src/bridgemate_dataconnector/dto/` or `tests/fixtures/` by hand**: they are
|
|
8
|
+
generated from the
|
|
9
|
+
[.NET client repository](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client)
|
|
10
|
+
(its `tools/DtoGenerator`, run with `--python-out`), which is the single source of truth for the
|
|
11
|
+
wire format. Changes there flow here through regeneration; hand edits would be overwritten and
|
|
12
|
+
can silently break wire compatibility.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bridgemate-dataconnector-client
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Scoring program client for the Bridgemate Data Connector over http. Communicate with Bridgemate Control Software (BCS 5) from a bridge scoring program written in Python.
|
|
5
|
+
Project-URL: Homepage, https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Python
|
|
6
|
+
Project-URL: Documentation, https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/blob/master/Documentation/MD/index.md
|
|
7
|
+
Project-URL: Issues, https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Python/issues
|
|
8
|
+
Author: Bridge Systems BV
|
|
9
|
+
License-Expression: LGPL-3.0-only
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: bcs,bridge,bridgemate,data-connector,scoring
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Games/Entertainment
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# Bridgemate Data Connector scoring program client for Python
|
|
23
|
+
|
|
24
|
+
[](https://pypi.org/project/bridgemate-dataconnector-client/)
|
|
25
|
+
[](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Python/actions/workflows/ci.yml)
|
|
26
|
+
|
|
27
|
+
Python client for scoring programs to communicate with the **Bridgemate Data Connector** over http.
|
|
28
|
+
Bridgemate Control Software (BCS 5) is needed to receive, process and return data from the Data
|
|
29
|
+
Connector. This package is the Python counterpart of the
|
|
30
|
+
[.NET client](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client);
|
|
31
|
+
its wire format is generated from the .NET source and verified against golden fixtures, so the two
|
|
32
|
+
clients speak an identical protocol.
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
- Python 3.10 or later — no dependencies outside the standard library
|
|
37
|
+
- A reachable Bridgemate Data Connector (installed with BCS 5). When the scoring program runs on a
|
|
38
|
+
different computer than BCS, enable listening on the local network in BCS and allow the port
|
|
39
|
+
(default 5079) through the firewall on the BCS computer.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
pip install bridgemate-dataconnector-client
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quick start
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from bridgemate_dataconnector import DataConnectorClient
|
|
51
|
+
from bridgemate_dataconnector.dto import DataConnectorResponseData, InitDTO
|
|
52
|
+
|
|
53
|
+
# Data Connector on the same computer (port discovered through the registry, default 5079):
|
|
54
|
+
client = DataConnectorClient("YourClubId", "YourLicenceKey")
|
|
55
|
+
|
|
56
|
+
# Data Connector on another computer on the local network:
|
|
57
|
+
client = DataConnectorClient("YourClubId", "YourLicenceKey", "http://192.168.1.50:5079")
|
|
58
|
+
|
|
59
|
+
# Check the connection.
|
|
60
|
+
response = client.connect()
|
|
61
|
+
|
|
62
|
+
# Create an event in BCS (see the developer's guide for how to build the InitDTO).
|
|
63
|
+
init_dto = InitDTO()
|
|
64
|
+
# ... fill sessions, scoring groups, sections, tables, rounds ...
|
|
65
|
+
response = client.initialize(init_dto)
|
|
66
|
+
|
|
67
|
+
# Poll for new board results and accept them once processed.
|
|
68
|
+
results = client.poll_for_results(session_guid)
|
|
69
|
+
for result in results:
|
|
70
|
+
... # store the result in your scoring program
|
|
71
|
+
if results:
|
|
72
|
+
client.accept_queue_data(session_guid, DataConnectorResponseData.Results)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
All methods return a `ScoringProgramResponse` (poll methods return lists of DTOs) and never raise
|
|
76
|
+
on communication problems: inspect `data_type`/`error_type` on the response, exactly like with the
|
|
77
|
+
.NET client.
|
|
78
|
+
|
|
79
|
+
### Naming
|
|
80
|
+
|
|
81
|
+
Python code uses snake_case (`result.session_guid`), while the wire format and the developer's
|
|
82
|
+
guide use PascalCase (`SessionGuid`). The mapping is one to one: drop the underscores and
|
|
83
|
+
capitalize each word. The generated `to_dict`/`from_dict` methods of every DTO spell out the
|
|
84
|
+
exact wire name of each field.
|
|
85
|
+
|
|
86
|
+
### Polling model
|
|
87
|
+
|
|
88
|
+
Http is stateless and the client keeps no connection open, so it fits both a long-running worker
|
|
89
|
+
(poll in a loop) and a web application (poll on demand during a request). The id of the last
|
|
90
|
+
polled queue item per data type is cached on the client instance and used by
|
|
91
|
+
`accept_queue_data()`; in a web application poll and accept within the same request, or track the
|
|
92
|
+
queue item ids yourself via `get_last_queue_item_id()`.
|
|
93
|
+
|
|
94
|
+
## Getting started sample
|
|
95
|
+
|
|
96
|
+
[examples/getting_started.py](examples/getting_started.py) is a small console application that
|
|
97
|
+
exercises the whole workflow against a live Data Connector — use it as a template for your own
|
|
98
|
+
scoring program:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
python examples/getting_started.py # interactive menu
|
|
102
|
+
python examples/getting_started.py --scenario # unattended full flow
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Mind that **"Initialize event" starts Bridgemate Control Software** and creates a small test
|
|
106
|
+
event (1 section, 2 tables, 3 rounds, 8 players). The poll queues only carry data once BCS
|
|
107
|
+
produces it: enter a result in BCS (or on a Bridgemate) and then poll for results here. The
|
|
108
|
+
sample prints every request and response envelope (wire trace, toggleable), which is the fastest
|
|
109
|
+
way to learn the protocol.
|
|
110
|
+
|
|
111
|
+
### Debugging in Visual Studio Code
|
|
112
|
+
|
|
113
|
+
Open this folder in VS Code and install the recommended extensions (Python + Python Debugger,
|
|
114
|
+
suggested automatically). Press <kbd>F5</kbd> — launch configurations for the sample and for
|
|
115
|
+
pytest are provided in `.vscode/launch.json`. Set a breakpoint in
|
|
116
|
+
`src/bridgemate_dataconnector/client.py::send_request()` to watch every envelope being built
|
|
117
|
+
and sent.
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
The protocol, the procedures (initializing an event, updating movements, the queues) and all DTOs
|
|
122
|
+
are described in the
|
|
123
|
+
[Bridgemate Data Connector developer's guide](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/blob/master/Documentation/MD/index.md).
|
|
124
|
+
The DTO classes in `src/bridgemate_dataconnector/dto` carry the same names as the guide (fields
|
|
125
|
+
in snake_case, see Naming above).
|
|
126
|
+
|
|
127
|
+
## Scope
|
|
128
|
+
|
|
129
|
+
This first release covers the core workflow: `connect`/`ping`, `initialize`, `continue_event`,
|
|
130
|
+
`update_movement`, `update_scoring_groups`, the `send_*` methods (results, player data,
|
|
131
|
+
participations, handrecords, TD calls, Bridgemate 2/3 settings), the `poll_for_*` methods and
|
|
132
|
+
`accept_queue_data`. BCS management commands are not wrapped yet; `send_request()` is public for
|
|
133
|
+
anything the client does not cover.
|
|
134
|
+
|
|
135
|
+
## Compatibility
|
|
136
|
+
|
|
137
|
+
| Package version | Data Connector / BCS |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| 1.x | BCS 5.x (Data Connector with http support) |
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
The `src/bridgemate_dataconnector/dto` modules and `tests/fixtures` are **generated** from the
|
|
144
|
+
.NET client repository (`tools/DtoGenerator` there) — do not edit them by hand. The fixture tests
|
|
145
|
+
assert structural JSON equality with the exact bytes the .NET client produces.
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
python -m venv .venv
|
|
149
|
+
.venv\Scripts\pip install -e ".[dev]" # Windows; on Linux/macOS: .venv/bin/pip
|
|
150
|
+
.venv\Scripts\python -m pytest
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Other platforms and support
|
|
154
|
+
|
|
155
|
+
The same client exists for
|
|
156
|
+
[.NET](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client) (the
|
|
157
|
+
reference implementation, including the scoring program emulator),
|
|
158
|
+
[PHP](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-PHP) and
|
|
159
|
+
[Java](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Java).
|
|
160
|
+
Questions are welcome in the
|
|
161
|
+
[Discussions](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/discussions)
|
|
162
|
+
of the main repository; see [SUPPORT.md](SUPPORT.md).
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
LGPL-3.0-only, like the .NET client.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Bridgemate Data Connector scoring program client for Python
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/bridgemate-dataconnector-client/)
|
|
4
|
+
[](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Python/actions/workflows/ci.yml)
|
|
5
|
+
|
|
6
|
+
Python client for scoring programs to communicate with the **Bridgemate Data Connector** over http.
|
|
7
|
+
Bridgemate Control Software (BCS 5) is needed to receive, process and return data from the Data
|
|
8
|
+
Connector. This package is the Python counterpart of the
|
|
9
|
+
[.NET client](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client);
|
|
10
|
+
its wire format is generated from the .NET source and verified against golden fixtures, so the two
|
|
11
|
+
clients speak an identical protocol.
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
- Python 3.10 or later — no dependencies outside the standard library
|
|
16
|
+
- A reachable Bridgemate Data Connector (installed with BCS 5). When the scoring program runs on a
|
|
17
|
+
different computer than BCS, enable listening on the local network in BCS and allow the port
|
|
18
|
+
(default 5079) through the firewall on the BCS computer.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
pip install bridgemate-dataconnector-client
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from bridgemate_dataconnector import DataConnectorClient
|
|
30
|
+
from bridgemate_dataconnector.dto import DataConnectorResponseData, InitDTO
|
|
31
|
+
|
|
32
|
+
# Data Connector on the same computer (port discovered through the registry, default 5079):
|
|
33
|
+
client = DataConnectorClient("YourClubId", "YourLicenceKey")
|
|
34
|
+
|
|
35
|
+
# Data Connector on another computer on the local network:
|
|
36
|
+
client = DataConnectorClient("YourClubId", "YourLicenceKey", "http://192.168.1.50:5079")
|
|
37
|
+
|
|
38
|
+
# Check the connection.
|
|
39
|
+
response = client.connect()
|
|
40
|
+
|
|
41
|
+
# Create an event in BCS (see the developer's guide for how to build the InitDTO).
|
|
42
|
+
init_dto = InitDTO()
|
|
43
|
+
# ... fill sessions, scoring groups, sections, tables, rounds ...
|
|
44
|
+
response = client.initialize(init_dto)
|
|
45
|
+
|
|
46
|
+
# Poll for new board results and accept them once processed.
|
|
47
|
+
results = client.poll_for_results(session_guid)
|
|
48
|
+
for result in results:
|
|
49
|
+
... # store the result in your scoring program
|
|
50
|
+
if results:
|
|
51
|
+
client.accept_queue_data(session_guid, DataConnectorResponseData.Results)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
All methods return a `ScoringProgramResponse` (poll methods return lists of DTOs) and never raise
|
|
55
|
+
on communication problems: inspect `data_type`/`error_type` on the response, exactly like with the
|
|
56
|
+
.NET client.
|
|
57
|
+
|
|
58
|
+
### Naming
|
|
59
|
+
|
|
60
|
+
Python code uses snake_case (`result.session_guid`), while the wire format and the developer's
|
|
61
|
+
guide use PascalCase (`SessionGuid`). The mapping is one to one: drop the underscores and
|
|
62
|
+
capitalize each word. The generated `to_dict`/`from_dict` methods of every DTO spell out the
|
|
63
|
+
exact wire name of each field.
|
|
64
|
+
|
|
65
|
+
### Polling model
|
|
66
|
+
|
|
67
|
+
Http is stateless and the client keeps no connection open, so it fits both a long-running worker
|
|
68
|
+
(poll in a loop) and a web application (poll on demand during a request). The id of the last
|
|
69
|
+
polled queue item per data type is cached on the client instance and used by
|
|
70
|
+
`accept_queue_data()`; in a web application poll and accept within the same request, or track the
|
|
71
|
+
queue item ids yourself via `get_last_queue_item_id()`.
|
|
72
|
+
|
|
73
|
+
## Getting started sample
|
|
74
|
+
|
|
75
|
+
[examples/getting_started.py](examples/getting_started.py) is a small console application that
|
|
76
|
+
exercises the whole workflow against a live Data Connector — use it as a template for your own
|
|
77
|
+
scoring program:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
python examples/getting_started.py # interactive menu
|
|
81
|
+
python examples/getting_started.py --scenario # unattended full flow
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Mind that **"Initialize event" starts Bridgemate Control Software** and creates a small test
|
|
85
|
+
event (1 section, 2 tables, 3 rounds, 8 players). The poll queues only carry data once BCS
|
|
86
|
+
produces it: enter a result in BCS (or on a Bridgemate) and then poll for results here. The
|
|
87
|
+
sample prints every request and response envelope (wire trace, toggleable), which is the fastest
|
|
88
|
+
way to learn the protocol.
|
|
89
|
+
|
|
90
|
+
### Debugging in Visual Studio Code
|
|
91
|
+
|
|
92
|
+
Open this folder in VS Code and install the recommended extensions (Python + Python Debugger,
|
|
93
|
+
suggested automatically). Press <kbd>F5</kbd> — launch configurations for the sample and for
|
|
94
|
+
pytest are provided in `.vscode/launch.json`. Set a breakpoint in
|
|
95
|
+
`src/bridgemate_dataconnector/client.py::send_request()` to watch every envelope being built
|
|
96
|
+
and sent.
|
|
97
|
+
|
|
98
|
+
## Documentation
|
|
99
|
+
|
|
100
|
+
The protocol, the procedures (initializing an event, updating movements, the queues) and all DTOs
|
|
101
|
+
are described in the
|
|
102
|
+
[Bridgemate Data Connector developer's guide](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/blob/master/Documentation/MD/index.md).
|
|
103
|
+
The DTO classes in `src/bridgemate_dataconnector/dto` carry the same names as the guide (fields
|
|
104
|
+
in snake_case, see Naming above).
|
|
105
|
+
|
|
106
|
+
## Scope
|
|
107
|
+
|
|
108
|
+
This first release covers the core workflow: `connect`/`ping`, `initialize`, `continue_event`,
|
|
109
|
+
`update_movement`, `update_scoring_groups`, the `send_*` methods (results, player data,
|
|
110
|
+
participations, handrecords, TD calls, Bridgemate 2/3 settings), the `poll_for_*` methods and
|
|
111
|
+
`accept_queue_data`. BCS management commands are not wrapped yet; `send_request()` is public for
|
|
112
|
+
anything the client does not cover.
|
|
113
|
+
|
|
114
|
+
## Compatibility
|
|
115
|
+
|
|
116
|
+
| Package version | Data Connector / BCS |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| 1.x | BCS 5.x (Data Connector with http support) |
|
|
119
|
+
|
|
120
|
+
## Development
|
|
121
|
+
|
|
122
|
+
The `src/bridgemate_dataconnector/dto` modules and `tests/fixtures` are **generated** from the
|
|
123
|
+
.NET client repository (`tools/DtoGenerator` there) — do not edit them by hand. The fixture tests
|
|
124
|
+
assert structural JSON equality with the exact bytes the .NET client produces.
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
python -m venv .venv
|
|
128
|
+
.venv\Scripts\pip install -e ".[dev]" # Windows; on Linux/macOS: .venv/bin/pip
|
|
129
|
+
.venv\Scripts\python -m pytest
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Other platforms and support
|
|
133
|
+
|
|
134
|
+
The same client exists for
|
|
135
|
+
[.NET](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client) (the
|
|
136
|
+
reference implementation, including the scoring program emulator),
|
|
137
|
+
[PHP](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-PHP) and
|
|
138
|
+
[Java](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Java).
|
|
139
|
+
Questions are welcome in the
|
|
140
|
+
[Discussions](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/discussions)
|
|
141
|
+
of the main repository; see [SUPPORT.md](SUPPORT.md).
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
LGPL-3.0-only, like the .NET client.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
- **Questions** about writing a scoring program client, the protocol or any of the client
|
|
4
|
+
libraries: please use
|
|
5
|
+
[GitHub Discussions](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/discussions)
|
|
6
|
+
on the main (C#) client repository — one place for all languages, so answers help everyone.
|
|
7
|
+
- **Bugs in this Python client**: open an
|
|
8
|
+
[issue here](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client-Python/issues).
|
|
9
|
+
Please include the request/response envelopes (run the getting-started sample with the wire
|
|
10
|
+
trace on) and the Data Connector version (`GET http://localhost:5079/` shows it).
|
|
11
|
+
- **Documentation**: start with the
|
|
12
|
+
[developer's guide](https://github.com/BridgeSystems/Bridgemate-Data-Connector-Scoring-Program-Client/blob/master/Documentation/MD/index.md).
|