Giter Club home page Giter Club logo

bibliotheque-toulouse-python's Introduction

bibliothequetoulouse

Build Status Coverage Status License

Description

Ce package permet d'interroger très simplement le catalogue des bibliothèques de Toulouse.

Pré-requis

  • Python 2.7 ou 3.6

Installation

$ pip install -U bibliothequetoulouse

Utilisation

  • Pour récupérer les informations sur les exemplaires disponibles d'un livre dans toutes les bibliothèques de Toulouse, et de les afficher au format JSON
# -*- coding: utf-8 -*-
import bibliothequetoulouse as bib

resultats = bib.rechercher(titre=u"le meilleur des mondes",
                           auteur=u"aldous huxley",
                           dispo_uniquement=True)

print("%d resultat(s)" % len(resultats))
print(resultats)

Ce qui renverra ce type de résultats :

[
    {
        "auteur": "Aldous Huxley", 
        "bibliotheque": "Ancely", 
        "cote": "TE F HUX", 
        "dispo": true, 
        "isbn": "", 
        "localisation": "Textes enregistrés", 
        "materiel": "Texte imprimé pour tout public", 
        "pertinence": 1.0, 
        "retour_attendu": "", 
        "titre": "Le meilleur des mondes", 
        "url_permanent": "http://catalogues.toulouse.fr/web2/tramp2.exe/do_keyword_search/log_in?setting_key=BMT1&servers=1home&query=ELC2608081&screen=hitlist.html"
    }, 
    {
        "auteur": "Aldous Huxley", 
        "bibliotheque": "Médiathèque José Cabanis", 
        "cote": "F HUXL", 
        "dispo": true, 
        "isbn": "", 
        "localisation": "Etage 2 - Littératures : Textes enregistrés", 
        "materiel": "Texte imprimé pour tout public", 
        "pertinence": 1.0, 
        "retour_attendu": "", 
        "titre": "Le meilleur des mondes", 
        "url_permanent": "http://catalogues.toulouse.fr/web2/tramp2.exe/do_keyword_search/log_in?setting_key=BMT1&servers=1home&query=ELC2608081&screen=hitlist.html"
    }
]
  • Pour récupérer les informations sur tous les exemplaires du même livre à la Médiathèque José Cabanis (disponibles à l'emprunt ou non) :
# -*- coding: utf-8 -*-
import bibliothequetoulouse as bib

resultats = bib.rechercher(titre=u"le meilleur des mondes",
                           auteur=u"aldous huxley",
                           bibli_souhaitees=[u'Médiathèque José Cabanis'])

for res in resultats:
    print("Cote : %s / Localisation : %s" % (res.cote, res.localisation))

Ce qui renverra par exemple :

Cote : F HUXL / Localisation : Etage 2 - Littératures : Textes enregistrés
Cote : TE HUXL / Localisation : Prêté
Cote : F HUXL / Localisation : Réserve pôle Littérature
Cote : F HUXL / Localisation : Prêté
Cote : RTF HUXL / Localisation : Prêté

bibliotheque-toulouse-python's People

Contributors

tducret avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.