setup_user_agent

pyvo.utils.http.setup_user_agent(*, purpose='science', primary_component='')[source]

Sets up a user agent for http requests made by pyVO.

This respects the IVOA Note “Operational Identification of Software Components”, https://ivoa.net/documents/Notes/softid/ (“softid”). If you do not want this, perhaps for privacy reasons, you can put an arbitrary string into pyvo.utils.http.USER_AGENT.

Parameters:
purposestr

The function of the current user agent in the VO: Usually “science”, but infrastructure code might use test or copy as per the softid Note.

primary_componentstr

An custom identifier for your particular program, preferably in the form “myProgram/0.2”.