Sample templates for making a request to CerealsDB web services

This page has sample scripts in perl and python for querying the CerealsDB web services. Your computer may require additional modules to successfully run these scripts, and you may need to specify the correct paths to the perl or python executables.


Perl


For perl scripts you will need to ensure that the computer or server that you run this script from has access to the JSON and LWP perl modules, which can be installed via CPAN.

The sample perl script can be downloaded from here. The script can be run by typing the following at the command line:

Make sure that the first line of the perl script is pointing to your perl executable (which perl) and make sure the perl files permissions are set to executable (chmod 755 search_CerealsDB_webservice.pl).


Python


The following script was tested on Python version 2.7.4

The sample python script can be downloaded from here. The script can be run by typing the following command:

Make sure that the first line of the python modules urllib2 and json are installed on your computer.




Based at the University of Bristol with support from BBSRC. BBSRC icon Bristol icon

Maintained by Mark Winfield.


-->