-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request; API access to the USPTO office rejection API; https://developer.uspto.gov/api-catalog/uspto-office-action-rejection-api #113
Comments
Hey! I'm working on a bunch of updates to the library. I'll add this one on. The big new change is async support. The master branch now has async-capable objects for all of the USPTO api's. For iteration, you can now iterate through objects using Right now, all those sync/async methods are duplicated (one version of each). Long term, I want the library to be async-native, with synchronous wrappers to support the current sync api's. That should also cut the code base in half :) |
Initial implementation is in PR #117. Would love your help answering some of the questions in that PR about how the API works. Thanks! |
My apologies for my lengthy delay in responding. I bit off more than I could chew on another open source project I contribute to, and then Christmas came. I was finally able to pull down the latest build and do some testings. Thank you for your hard workj! I see the async change has introduced some new complexities. I noticed that globalDossierApplication.objects.get() is using the async features, and my attempt to call the function is triggering an exception I can't seem to resolve. Steps to reproduce below + exception output. This is using pytest for reference
|
Hey! Thanks for the note. This is actually a bug I've been trying to solve. I've tried to incorporate by essentially rewriting all the network access code one time as async, and then creating one-time event loops to run the code synchronously if async isn't being used. But that's causing issues like this, where if you try to access a property that requires another network call, it creates event loop chaos. I think the solution here is ultimately going to be to completely factor out the actual network request from all other code so I can switch out a a sync/async client right at the point of hitting the wire. I'm looking at that this afternoon. Thanks! |
You are well beyond my knowledge as I have not implemented async io in python before (just C++). However, one solution I saw was at this link: https://stackoverflow.com/questions/76460059/python-unknown-error-in-http-implementation. The solution recommendation was to use native asyncio methods rather than mixing threads with asyncio- not sure if this is duplicative of what you already found. |
Can you confirm which version of patent_client you're using? I've been using |
Also #133 is now a blocker to addressing this. Once I get the library all back up to snuff, I'll rework this in as well. |
The initial request is returning results just fine:
However, once I go to download an office action document from the results, the ". . . is bound to a different event loop" exception occurs. Did you update the download code as well? Full code I am using:
|
This is my corporate github account name- forgot I was still logged in! This is Ken Thompson, although I am sure you already inferred that |
Would it be possible to add in support for queries to the USPTO Office Action Rejection API?
https://developer.uspto.gov/api-catalog/uspto-office-action-rejection-api
Thanks very much!
Ken
The text was updated successfully, but these errors were encountered: