Skip to content

Python: support for fhirpy client#43

Merged
ryukzak merged 20 commits intomainfrom
fhirpy-client-2
Jan 29, 2026
Merged

Python: support for fhirpy client#43
ryukzak merged 20 commits intomainfrom
fhirpy-client-2

Conversation

@MikhailArtemyev
Copy link
Copy Markdown
Collaborator

No description provided.

@MikhailArtemyev MikhailArtemyev changed the title Fhirpy client Python: support for fhirpy client Dec 22, 2025
Copy link
Copy Markdown
Collaborator

@ryukzak ryukzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make two examples here (don't need to push both fully to repo): for a simple client and for a FHIRPY client.

Comment thread assets/api/writer-generator/python/requirements.txt Outdated
Comment thread examples/python/fhir_types/hl7_fhir_r4_core/account.py Outdated
Comment thread assets/api/writer-generator/python/fhirpy_base_model.py Outdated
Comment thread src/api/writer-generator/python.ts Outdated
Comment thread Makefile
export class Python extends Writer<PythonGeneratorOptions> {
private readonly nameFormatFunction: (name: string) => string;
private tsIndex: TypeSchemaIndex | undefined;
private readonly forFhirpyClient: boolean;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, not a call for action: maybe we can generalize it and allow users to pass not only classes from assets, but a custom user class too?

I don't have an idea how to do it without overengineering, but maybe you have?

Comment thread src/api/writer-generator/python.ts
Comment thread examples/python/fhirpy_client.py Outdated
@MikhailArtemyev MikhailArtemyev marked this pull request as ready for review January 14, 2026 18:20
Copy link
Copy Markdown
Collaborator

@ryukzak ryukzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but can we make some changes:

  • Let’s put Python and FHIRPy examples in different paths; it will simplify layouts. We don't need to put all generated code in the example for both of them.
  • Please update the example list in the readme.
  • Can you call mypy on the example code and generated code?

@ryukzak ryukzak merged commit 9f6c8bd into main Jan 29, 2026
29 checks passed
@ryukzak ryukzak deleted the fhirpy-client-2 branch January 29, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants