Anyone interested in working on a Python client?

This space is made available to users of Open Patent Services (OPS) web-service and now also to users of EPO’s bulk data subscription products such as 14. EPO worldwide bibliographic database (DOCDB), 14.11 EPO worldwide legal status database (INPADOC), 14.12 EP full text data, 14.1 EP bibliographic data (EBD)and more.

Users can ask each other questions, exchange experiences and solutions, post ideas. The moderator will use this space to announce changes or other relevant information.
Post Reply

gsong
Posts: 4
Joined: Tue Jan 21, 2014 6:08 pm

Anyone interested in working on a Python client?

Post by gsong » Tue Jan 21, 2014 6:18 pm

Hi there,

I'm in the planning stages of writing an open source Python client to access the OPS. I've already had a lot of experience dealing with the throttling aspect of the API from the previous versions. I've studied the new quota system and will incorporate that into the client as well.

Was wondering if there are Python users out there who are:

1. Willing to contribute development to the package
2. Willing to validate the public interface for the package
3. Willing to use the package once it's done (planning to have at least a usable version by the end of January)

--
George


gsong
Posts: 4
Joined: Tue Jan 21, 2014 6:08 pm

Re: Anyone interested in working on a Python client?

Post by gsong » Tue Feb 04, 2014 3:30 am

I've made pretty good progress so far. If anyone is interested at taking a look at the client interface or contributing, I'd appreciate any feedback.

The project is hosted on GitHub, since the forum won't let me post a like, you'll have to Google for "github python-epo-ops-client".


gsong
Posts: 4
Joined: Tue Jan 21, 2014 6:08 pm

Re: Anyone interested in working on a Python client?

Post by gsong » Thu Feb 20, 2014 7:18 pm

OK, python-epo-ops-client has officially been release. Take a look and let me know what you think. Better yet, use it.

Code: Select all

pip install python-epo-ops-client
The project is hosted at https://github.com/55minutes/python-epo-ops-client


mugabo
Posts: 1
Joined: Wed Jul 23, 2014 4:57 pm

Re: Anyone interested in working on a Python client?

Post by mugabo » Wed Jul 23, 2014 5:00 pm

Hi gsong,
thanks for this. am interested in this package. Will provide initial feedback shortly.


chris1
Posts: 1
Joined: Mon Sep 22, 2014 6:33 pm

Re: Anyone interested in working on a Python client?

Post by chris1 » Mon Sep 22, 2014 6:41 pm

Thanks so much George for creating this project and sharing it. I'm trying to get started with it and am having trouble downloading biblio data. I seem to be able to authenticate as I can get an access token, but every time I try to pull a record I get a 404 error. Any guidance would be greatly appreciated.

Code: Select all

import epo_ops
 
registered_client = epo_ops.RegisteredClient(key='hidden', secret='hidden')
registered_client.access_token  # To see the current token
response = registered_client.published_data(
    reference_type = 'publication', 
    input = epo_ops.models.Docdb('1000000', 'EP', 'A1')
)
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
<ipython-input-15-147eba2ea796> in <module>()
      5 response = registered_client.published_data(
      6     reference_type = 'publication',
----> 7     input = epo_ops.models.Docdb('1000000', 'EP', 'A1')
      8 )

C:\Users\Chris\AppData\Local\Continuum\Miniconda3\lib\site-packages\epo_ops\api.py in published_data(self, reference_type, input, endpoint, constituents)
     90         return self._service_request(
     91             self.__published_data_path__, reference_type, input, endpoint,
---> 92             constituents
     93         )
     94 

C:\Users\Chris\AppData\Local\Continuum\Miniconda3\lib\site-packages\epo_ops\api.py in _service_request(self, path, reference_type, input, endpoint, constituents)
     83             self, path, reference_type, input, endpoint, constituents or []
     84         )
---> 85         return self.make_request(url, input.as_api_input())
     86 
     87     def published_data(

C:\Users\Chris\AppData\Local\Continuum\Miniconda3\lib\site-packages\epo_ops\api.py in make_request(self, url, data, extra_headers)
    165         response = self.check_for_expired_token(response)
    166         response = self.check_for_exceeded_quota(response)
--> 167         response.raise_for_status()
    168         return response

C:\Users\Chris\AppData\Local\Continuum\Miniconda3\lib\site-packages\requests\models.py in raise_for_status(self)
    806 
    807         if http_error_msg:
--> 808             raise HTTPError(http_error_msg, response=self)
    809 
    810     def close(self):

HTTPError: 404 Client Error: Not Found


gsong
Posts: 4
Joined: Tue Jan 21, 2014 6:08 pm

Re: Anyone interested in working on a Python client?

Post by gsong » Sat Dec 13, 2014 2:15 pm

@chris1 This was a Windows only bug which was just fixed. Sorry for not identifying it earlier. I'm just not that familiar with Windows.

In any case, the latest version should fix this problem.


Post Reply