Please be attention:
- (void)requestUserTokenForDeveloperToken:(NSString *)developerToken
completionHandler:(void (^)(NSString *userToken, NSError *error))completionHandler;
This is a Objective-C interface, you can also switch language in there(The Language drop-down there shows all the languages):

Then there will shows the Swift interface now:
func requestUserToken(forDeveloperToken developerToken: String,
completionHandler: @escaping (String?, Error?) -> Void)
Apple only provide the two language types API for developers, there is no python(other) language interface there.
From your:
But even if I write it in Swift, on a non-Apple machine, that wouldn’t help, is all I’m asking.
You check the API doc in the right sidebar, will find:
SDKs
iOS 11.0+
tvOS 11.0+
Framework
StoreKit
The API is available in iOS and tvOS SDKs, Apple do not run those SDKs on the non-apple machine.