Git Product home page Git Product logo

reference-run-ranking's Introduction

OMS API: retrieve information from the OMS database

Collection of tools for obtaining OMS information in json-like format.
Note: this functionality supersedes the older version in the omsinterface folder!

References:
The code is based on the oms api repository here: https://gitlab.cern.ch/cmsoms/oms-api-client. The file omsapi.py in this folder is a direct copy of the omsapi/__init__.py file in that repository, as recommended by the developers to get it running on SWAN. See also these slides for further info on the setup of the app and this site for the available endpoints.

How to use:

  • You will need to authenticate through an application registered with the OMS developer team. Either contact me on [email protected] so I can send you my application ID and client secret, or create your own as explained below.
  • Open example.ipynb for some examples. You need to import get_oms_api.py, then create an OMSAPI instance via get_oms_api() (only once, can be re-used for multiple queries) and then query the information via get_oms_data( <arguments> ). See example.ipynb or get_oms_data.py for details.

How to create a personal application for authentication:

  • You will need to register a personal application ID and client secret with the OMS developer team. See the slides linked above on how to do that (only slide 4-6 are relevant, the rest has been taken care of). You will receive an application ID and client secret (both are just string-like variables).
  • Create a new python file in this folder called clientid.py and define two variables in there:
    API_CLIENT_ID = '<your application ID>'
    API_CLIENT_SECRET = '<your client secret>'
  • That should be all!

reference-run-ranking's People

Contributors

guillermofidalgo avatar

Stargazers

Roy F. Cruz Candelaria avatar

Watchers

 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.