Releases: jonperron/python-navitia-client
2.0.2
What's Changed
- feat(import): simplify import of NavitiaClient by @jonperron in #101
Full Changelog: 2.0.1...2.0.2
2.0.1
What's Changed
- chore(readme): update readme to describe 2.0.0 changes by @jonperron in #100
Full Changelog: 2.0.0...2.0.1
2.0.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[2.0.0] - 2025-11-11
⚠️ BREAKING CHANGES
This is a major version release with significant API changes. All API client methods now require Request objects instead of individual parameters, which provides better type safety and more maintainable code.
Migration Guide:
Before (v1.x):
# Old way with individual parameters
journeys = client.journeys.list_journeys(
from_="stop_area:RAT:SA:GDLYO",
to_="stop_area:RAT:SA:CHDEG",
datetime_=datetime(2024, 6, 1, 8, 0),
count=5
)After (v2.0):
from navitia_client.entities.request.journey import JourneyRequest
# New way with Request objects
request = JourneyRequest(
from_="stop_area:RAT:SA:GDLYO",
to_="stop_area:RAT:SA:CHDEG",
datetime_=datetime(2024, 6, 1, 8, 0),
count=5
)
journeys = client.journeys.list_journeys(request=request)Added
- Request Objects for All APIs: Introduced dedicated request classes for all API endpoints:
JourneyRequestfor journey queriesPlacesNearbyRequestfor places nearby queriesArrivalRequestfor arrival queriesDepartureRequestfor departure queriesEquipmentReportRequestfor equipment report queriesFreefloatingsNearbyRequestfor freefloatings nearby queriesIsochoneRequestfor isochrone queriesLineReportRequestfor line report queriesTrafficReportRequestfor traffic report queriesRouteScheduleRequestfor route schedule queriesStopScheduleRequestfor stop schedule queriesTerminusScheduleRequestfor terminus schedule queries- Request classes for all PT (Public Transportation) APIs
Changed
-
API Method Signatures: All API client methods now accept Request objects instead of multiple individual parameters
- Public Transportation APIs (lines, routes, stops, networks, etc.)
- Journey APIs
- Places and geocoding APIs
- Schedule APIs (route schedules, stop schedules, terminus schedules)
- Report APIs (line reports, traffic reports, equipment reports)
- Arrival and departure APIs
- Isochrone APIs
- Freefloatings nearby APIs
-
Entity Organization: Moved all entity classes to
responsenamespace for better organization- Entities are now under
navitia_client.entities.response.* - Request entities are under
navitia_client.entities.request.* - This provides clearer separation between request and response models
- Entities are now under
-
Documentation: Updated documentation for all PT API clients to reflect the new Request object pattern
Fixed
- Fixed workflow configuration for automatic releases (#91)
- Ensured consistent use of request objects across all API clients (#97)
Pull Requests
- fix(workflow): fix workflow to autorelease by @jonperron in #91
- chore(refacto): move all entities to response entities by @jonperron in #93
- feat(api): replace dict by request objects for non-pt APIs by @jonperron in #94
- feat(api): replace dict by request objects for pt APIs by @jonperron in #95
- chore(doc): update doc for all pt api clients by @jonperron in #96
- fix(api): use request objects in all api clients by @jonperron in #97
Benefits of This Release
- Type Safety: Request objects provide better IDE autocomplete and type checking
- Maintainability: Easier to add new parameters without changing method signatures
- Documentation: Request objects are self-documenting with clear parameter descriptions
- Validation: Centralized parameter validation in request classes
- Testing: Simplified testing with reusable request objects
Upgrading
To upgrade from v1.x to v2.0:
-
Update your imports to include the required Request classes:
from navitia_client.entities.request.journey import JourneyRequest from navitia_client.entities.request.places_nearby import PlacesNearbyRequest # etc.
-
Replace method calls with individual parameters with Request objects:
# Create a request object request = JourneyRequest(from_="...", to_="...", count=5) # Pass it to the API method result = client.journeys.list_journeys(request=request)
-
Update imports for response entities if you were importing them directly:
# Old from navitia_client.entities.journey import Journey # New from navitia_client.entities.response.journey import Journey # Or simply from navitia_client.entities.response import Journey
For detailed API documentation, see the docs/api_support directory.
[1.3.0] and earlier
See GitHub Releases for previous versions.
1.3.0
What's Changed
- feat(pagination): add missing parameters by @jonperron in #85
- feat(pt): add support of disable_geojson parameter by @jonperron in #86
- feat(journeys): add support for some Valhalla parameters by @jonperron in #87
- feat(equiment): add support for equipment API by @jonperron in #88
- feat(freefloating): add support for freefloatings nearby API by @jonperron in #89
- bump(version): bump to 1.3.0 by @jonperron in #90
Full Changelog: 1.2.4...1.3.0
1.2.4
What's Changed
- fix(github): fix github workflow duplicated calls to test pypi by @jonperron in #79
Full Changelog: 1.2.3...1.2.4
1.2.3
1.2.2
1.2.1
What's Changed
- Potential fix for code scanning alert no. 1: Workflow does not contain permissions by @jonperron in #74
- chore(readme): update with badges by @jonperron in #75
- Chore/fix url by @jonperron in #76
Full Changelog: 1.2.0...1.2.1