Repository navigation
docs(fmp-py): add runnable usage examples with strict type-checking - #412
Merged
Merged
Conversation
Add runnable example scripts demonstrating common fmp-py usage patterns. * Added `examples/auth.py` showing authentication setup. * Added `examples/errors.py` illustrating error handling. * Added `examples/timeouts_and_limits.py` covering timeouts and response-size limits. * Added `examples/_local_server.py` as a supporting helper for the examples.
Add runnable example scripts demonstrating the main client workflows: * quickstart: minimal setup and first requests to get started quickly. * nullable_fields: handling optional and null-valued response fields. * lifecycle_and_threads: client lifecycle management and thread fan-out for concurrent requests. * bulk: fetching bulk data as CSV. * binary_and_dicts: working with XLSX binary payloads and converting responses via to_dict. * pagination: iterating through paginated endpoints.
Add an Examples section to the README pointing to the new examples directory, and include a README and pyproject.toml for the examples so the runnable scripts cover auth modes, timeouts and bulk limits, error handling, threads, bulk CSV, binary downloads, and pagination.
Add a new test that runs the `examples/` scripts through `mypy --strict` against the shipped stubs, alongside the existing static contract check. **Testing Improvements:** * Added `test_examples_pass_strict_mypy` in `tests/test_stubs.py` to verify the runnable scripts under `examples/` type-check cleanly in strict mode. * Introduced an `EXAMPLES` path pointing at the crate's `examples/` directory, resolved relative to the test file. * Updated the module docstring to note that `mypy` now also checks the `examples/` scripts in strict mode against the same stubs.
benbenbang
enabled auto-merge (rebase)
October 3, 2026 14:41
benbenbang
force-pushed
the
docs/fmp-py-examples
branch
from
October 4, 2026 01:08
8cbc985 to
cc37650
Compare
benbenbang
disabled auto-merge
October 4, 2026 01:12
Add a .gitignore in crates/fmp-py/examples to exclude the uv.lock file that `uv run` generates there, keeping it out of version control.
Add negated path filters for example directories to the pull_request and push triggers, preventing the go-sdk workflow from running when only example code under crates/fmp-py, sdk/go, or sdk/node changes.
benbenbang
force-pushed
the
docs/fmp-py-examples
branch
from
October 4, 2026 01:23
919d058 to
a6f8820
Compare
benbenbang
enabled auto-merge (rebase)
October 4, 2026 01:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fmp-py SDK lacked runnable, discoverable examples demonstrating common client workflows. This change adds a documented examples directory covering the main usage patterns and wires it into both the README and the test suite to keep the scripts accurate over time.