Change Log¶
2.1.0 - 2026-08-23¶
Changed¶
Predicate caching for keyword validation now works when using
AsyncSpaceTrackClientwith trio. Previously, the on-disk cache was skipped because the file locking implementation only supported asyncio. (#160)AsyncSpaceTrackClientno longer performs blocking cache file reads and writes on the event loop; they now run in a worker thread. (#160)Rate limit waits now guarantee that the
callbackhas finished before the request is retried, in all clients. As a result, an exception raised by the callback now propagates instead of being silently discarded: directly inSpaceTrackClient, and as anExceptionGroupon asyncio, matching the existing trio behaviour. (#160)When the Space-Track session expires (after two hours without requests), the client now logs in again and retries the request transparently instead of failing every subsequent request. (#164)
Sets and frozensets are now accepted as predicate values and joined with commas like sequences. Bytes-like values now raise
TypeErrorinstead of being sent as comma-separated integers. (#169)
Fixed¶
AsyncSpaceTrackClientnow accepts a plain function as the rate limitcallback, as shown in the documentation, in addition to a coroutine function. (#160)Concurrent first requests on a fresh client now share a single login request instead of each sending their own. (#161)
Model definition requests are now rate limited like all other requests. (#163)
Requests sent after a rate limit wait are now counted against the rate limit. Previously they were not, so sustained use could exceed Space-Track’s limits and trigger server-side rate limit errors. (#163)
SpaceTrackClient.close()andAsyncSpaceTrackClient.close()now close the underlying HTTPX client even if logging out fails. (#166)Setting
base_urlnow resets the authentication state and the cached predicates, which are specific to the previous host. (#166)Fixed a
ReferenceErrorwhen chaining a request off a temporary client, e.g.SpaceTrackClient(...).basicspacedata.gp(...). (#167)get_predicates()now returns the known predicates for request classes without a model definition on Space-Track (such asfileshare/downloadandpublicfiles/dirs) instead of failing. The returnedPredicateobjects have atype_ofNone, since no model definition exists to provide it. (#168)parse_types=Truenow works together withmetadata=Trueingeneric_request()and the request class methods; previously the metadata-wrapped response made it fail after the request had succeeded. (#170)Fixed a
TypeErrorwhen passing positional arguments to request class methods such asclient.gp_history(...). The request class was bound as a keyword argument internally, so any positional argument clashed with it. (#171)Error responses whose JSON
errorvalue is not a string no longer raiseTypeErrorinstead ofhttpx2.HTTPStatusError. (#172)
2.0.0 - 2026-08-10¶
Added¶
Changed¶
Removed¶
1.4.0 - 2025-02-21¶
Added¶
Support for Python 3.13
timeoutparameter to request methods. SeeSpaceTrackClient.generic_request
Changed¶
Space-Track prefers that users log out of sessions explicitly. The existing
SpaceTrackClient.closemethod will call the newSpaceTrackClient.logoutmethod if necessary.For this reason, using the client as a context manager is now recommended:
with SpaceTrackClient(...) as st: st.gp(...)
The Space-Track API used to validate keyword arguments is now cached on disk so that it is not queried more than once per day. Due to lack of support for
trioin the package used to manage the cache, keyword validation will typically be skipped when usingAsyncSpaceTrackClientwithtriorather thanasyncio.Improved Rate Limiting documentation to emphasise that the library cannot handle all of Space-Track’s usage guidelines for you.
Default timeouts increased to 30 seconds to better handle current Space-Track performance.
Deprecated¶
The
tle,tle_latest,tle_publish, andommclasses have been deprecated by Space-Track and are scheduled to be removed. Visit https://www.space-track.org/documentation#/api for more information.
Removed¶
Support for Python 3.8
1.3.1 - 2024-08-01¶
Fixed¶
The ‘mediumtext’ predicate type is now understood.
1.3.0 - 2024-05-07¶
Added¶
Timezone-aware datetimes are supported in request predicates.
1.2.0 - 2023-11-25¶
Added¶
additional_rate_limitargument toSpaceTrackClient.
Fixed¶
Since version 1.0, the value passed to
SpaceTrackClient.callback, if set, is fromtime.monotonic()but the documentation was not updated to reflect this.
1.1.0 - 2023-10-15¶
Added¶
dirsanddownloadrequest classes for thepublicfilesrequest controller.Support for Python 3.12
Removed¶
Support for Python 3.7
1.0.1 - 2023-05-23¶
Fixed¶
requests which should have been streamed (e.g.
iter_content=True) were not.requests which need to follow redirects work again.
1.0.0 - 2023-05-22¶
Added¶
AsyncSpaceTrackClientsupports Trio in addition to asyncio.
Changed¶
The sync and async clients share the same sans-io core.
The underlying HTTP library used is now httpx (formerly
requestsforSpaceTrackClientandaiohttpforAsyncSpaceTrackClient). Users will need to change any exception handling to catch httpx exceptions.
Removed¶
The
asyncextra no longer exists because theAsyncSpaceTrackClientis available by default.Support for Python 3.6
Fixed¶
The modeldef for the fileshare/download class was deprecated by Space-Track, so the client no longer uses this API.
0.16.0 - 2021-01-03¶
Added¶
Support for the car, folder, and satellite classes.
A rush storage backend can be provided to a new
rush_storeargument to coordinate rate limiting across multiple instances.rush_key_prefixto optionally prefix keys used in the rush storage backend.
Fixed¶
When
parse_typesis used, dates are parsed using an ISO 8601 parser, which fixes the parsing of date formats returned by newer request classes (e.g. gp).
0.15.0 - 2020-09-25¶
Added¶
Support for the
cdm_publicandgp_historyclasses.
0.14.0 - 2020-06-21¶
Added¶
Support for Space-Track’s per-hour rate limit in addition to the per-minute limit.
Changed¶
The per-minute rate limit was increased to 30 as documented by Space-Track.
Require aiohttp 3 for the
asyncextra.AsyncSpaceTrackClientis now an asynchronous context manager. Useasync withinstead ofwith.
Removed¶
Support for Python 2.7, 3.4, and 3.5.
0.13.7 - 2020-06-20¶
Added¶
Support for the general perturbations (
gp) class.
0.13.6 - 2020-03-20¶
Fixed¶
Regression in 0.13 that prevented
spephemeris/downloadfrom working by trying to load a model definition which it doesn’t have.
0.13.5 - 2020-03-18¶
Fixed¶
The ‘text’ predicate type is now understood.
Unknown predicate types issue a warning instead of raising an exception.
0.13.4 - 2019-12-24¶
Added¶
SpaceTrackClientgained abase_urlparameter to allow the use of an alternate Space-Track server.
0.13.3 - 2019-03-11¶
Fixed¶
The deprecation warning about importing
SequenceorMappingfromcollectionsinstead ofcollections.abc.
0.13.2 - 2018-12-31¶
Fixed¶
The
asyncextra installs aiohttp 2 becausespacetrackis not yet aiohttp 3 compatible.Deprecation warnings about invalid escape sequences.
0.13.1 - 2018-01-18¶
Fixed¶
spacetrackcan be installed with setuptools v38.0+, which requiresinstall_requiresinsetup.pyto be ordered.
0.13.0 - 2017-06-17¶
Added¶
parse_typesflag to optionally parse types as described by themodeldefAPI.Compatibility with
maneuverandmaneuver_historyrequest classes forexpandedspacedatarequest controller.Compatibility with
uploadanddeleterequest classes forfilesharerequest controller.
Fixed¶
Predicates with the enum type are parsed correctly. Previously, single-valued enums had
Noneas a second value, and enums with more than two values only had the first and last value due to the regex match not capturing repeated groups. The values aren’t used byspacetrack, so the bug went unnoticed.Exception on Python 3.5+ in threads without an
asyncioevent loop (even using the normalSpaceTrackClient). Fixed by requiringratelimiter>= 1.2.0
Changed¶
Require aiohttp >= 2.0 for the
asyncextra.
0.12.0 - 2016-06-28¶
Added¶
Request controller can be passed explicitly to methods that take a request class, because some request classes are present in more than one controller.
Request controller proxy attribute, e.g.
SpaceTrackClient.fileshare.file(), which is equivalent toSpaceTrackClient.generic_request('file', controller='fileshare').dir(SpaceTrackClient(...))now includes the request controllers and request classes so it’s easier to see what can be called.
Fixed¶
/modeldefAPI not queried if no predicates are passed. This allowsspephemeris/downloadto be used, which doesn’t have a model definition.
Changed¶
Calling request class methods uses first request controller that matches. The order is stored in the keys of the
SpaceTrackClient.request_controllersordered dict, currentlybasicspacedata,expandedspacedata,fileshare,spephemeris. Any new request controllers will be added to the end, to preserve lookup order. New request classes that would change the order will accompany a major version bump.AsyncSpaceTrackClientuses requests’ CA file for same experience with both clients.
0.11.1 - 2016-03-01¶
Fixed¶
Bump ratelimiter version to improve rate limiting for
AsyncSpaceTrackClient
Changed¶
Documentation included in source distribution.
0.11.0 - 2016-02-21¶
Added¶
Some unit tests added for
AsyncSpaceTrackClient.
Fixed¶
\r\nto\nnewline conversion for async chunk iterator.
Changed¶
AsyncSpaceTrackClientcan no longer be imported from the top levelspacetrackmodule, since this would cause an error if optional dependencyaiohttpwas not installed. It must be imported fromspacetrack.aio.
0.10.0 - 2016-02-04¶
Fixed¶
Compatibility with
fileanddownloadrequest classes forfilesharerequest controller.uploadrequest class removed, unable to test.Rate limit violation HTTP status code 500 handled during predicate information request.
Changed¶
iter_lines=Truenow raisesValueErrorif receiving binary data (currently only possible withdownloadrequest class).Removed internal method
_get_predicate_fields, set comprehension used inline instead.Predicateclass now has adefaultattribute.
0.9.0 - 2016-01-28¶
First release.