Skip to main content

A module which allows you to retrieve the cheapest flights, with/out return flights, within a fixed set of dates.

Project description

# Ryanair Python Written by Ciarán Ó hAoláin, 2018. This module allows you to retrieve the cheapest flights, with/out return flights, within a fixed set of dates. This is done directly through Ryanair’s API and requires an API Key supplied by Ryanair. ### Installation Run the following command in the terminal: ` pip install ryanair-py ` ### Initialisation Creating an instance is done as follows: `python from ryanair import Ryanair ryanair = Ryanair("YOUR-CONSUMER-KEY", "YOUR-CURRENCY") ` ### Get one-way flights `python flights = ryanair.getFlights("DUB", "2018-10-27", "2018-10-30") ` Returns an array of Flight objects, like this: `python flights[0] == Flight(origin='DUB', originFull='Dublin, Ireland', destination='MAN', destinationFull='Manchester, United Kingdom', departureTime='2018-10-30T06:25:00', price=9.78) cheapestFlightPrice = flight.price # price is now a float containing the price (in the unit of currency originally declared earlier) of this flight ` ### Get return flights `python trips = ryanair.getReturnFlights("DUB", "2018-10-27", "2018-10-30", "2018-11-01", "2018-11-03") ` Returns an array of Trip objects, like this: `python trips[0] == Trip(outbound=Flight(origin='DUB', originFull='Dublin, Ireland', destination='LPL', destinationFull='Liverpool, United Kingdom', departureTime='2018-10-30T20:50:00', price=9.99), inbound=Flight(origin='LPL', originFull='Liverpool, United Kingdom', destination='DUB', destinationFull='Dublin, Ireland', departureTime='2018-11-01T08:25:00', price=18.51), totalPrice=28.5) trips[0].outbound.price==9.99 trips[0].totalPrice==28.5 `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ryanair-py-0.0.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ryanair_py-0.0.4-py3.6.egg (6.8 kB view details)

Uploaded Egg

File details

Details for the file ryanair-py-0.0.4.tar.gz.

File metadata

  • Download URL: ryanair-py-0.0.4.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ryanair-py-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c3987152af24152430781ebc58e540748bf6a243ad6b66082de6909988053b59
MD5 63577d4682b47d423d8ccdb04cbc21ac
BLAKE2b-256 3c002d77c643c36e71229f5a4d4baeea8d4debbf99c24d7483d0bffca1e51d49

See more details on using hashes here.

File details

Details for the file ryanair_py-0.0.4-py3.6.egg.

File metadata

  • Download URL: ryanair_py-0.0.4-py3.6.egg
  • Upload date:
  • Size: 6.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for ryanair_py-0.0.4-py3.6.egg
Algorithm Hash digest
SHA256 b2d78da0c9f392658a3748d5470145dba417f26bb1acf248046e2a430099a243
MD5 ad437e50af84491bc6e26eea6034e720
BLAKE2b-256 8966f599362604b0a60f0c6752edcfc08a29e3b07342689a65a2871bfc6b02aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page