pyrad.utils.database_utilities module

pyrad.utils.database_utilities.ascii_table_records(response, block_size=512)[source]

Reads the next line from an ascii table.

Parameters
  • response – A http.client.HTTPResponse object.

  • block_size – Size in bytes of blocks that will be read.

Yields

Record of the HITRAN database.

pyrad.utils.database_utilities.scrub(string)[source]

Scrubs user-provided string to prevent database injection.

Parameters

string – User provided database input.

Returns

The string scrubbed of any trailing spaces, punctuation, or additional text.