X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dakweb%2Fqueries%2Fsource.py;h=957cb0cc7c9169ae1189d672204c83c516ab8b04;hb=e41ae8d5a5fd9c204711a36b47e0593312da8c75;hp=91448e5db7faf6f2701d2565de36c35006060e91;hpb=a85a084aa8c7e04f8f438ff51ea35f94f3b33247;p=dak.git diff --git a/dakweb/queries/source.py b/dakweb/queries/source.py index 91448e5d..957cb0cc 100755 --- a/dakweb/queries/source.py +++ b/dakweb/queries/source.py @@ -1,4 +1,10 @@ -#!/usr/bin/python +""" Queries related to source packages + +@contact: Debian FTPMaster +@copyright: 2014 Mark Hymers +@copyright: 2014 Joerg Jaspert +@license: GNU General Public License version 2 or later +""" from sqlalchemy import or_ import bottle @@ -7,14 +13,28 @@ import json from daklib.dbconn import DBConn, DBSource, Suite, DSCFile, PoolFile from dakweb.webregister import QueryRegister + @bottle.route('/dsc_in_suite//') def dsc_in_suite(suite=None, source=None): """ - dsc_in_suite(suite, source) + Find all dsc files for a given source package name in a given suite. - returns: list of dictionaries + @since: December 2014 - Find all dsc files for a given source package name in a given suite. + @type suite: string + @param suite: Name of the suite. + @see: L{I{suites}} on how to receive a list of valid suites. + + @type source: string + @param source: Source package to query for. + + @rtype: list of dictionaries + @return: Dictionaries made out of + - version + - component + - filename + - filesize + - sha256sum """ if suite is None: return bottle.HTTPError(503, 'Suite not specified.') @@ -45,13 +65,19 @@ QueryRegister().register_path('/dsc_in_suite', dsc_in_suite) @bottle.route('/sources_in_suite/') def sources_in_suite(suite=None): """ - sources_in_suite(suite) + Returns all source packages and their versions in a given suite. - returns: list of dictionaries + @since: December 2014 - Returns all source packages and their versions in a given suite. - """ + @type suite: string + @param suite: Name of the suite. + @see: L{I{suites}} on how to receive a list of valid suites. + @rtype: list of dictionaries + @return: Dictionaries made out of + - source + - version + """ if suite is None: return bottle.HTTPError(503, 'Suite not specified.') @@ -73,12 +99,13 @@ QueryRegister().register_path('/sources_in_suite', sources_in_suite) @bottle.route('/all_sources') def all_sources(): """ - all_sources() - - returns: list of dictionaries - Returns all source packages and their versions known to the archive (this includes NEW). + + @rtype: list of dictionaries + @return: Dictionaries made out of + - source + - version """ s = DBConn().session()