Skip to main content

No project description provided

Project description

Proyecto Bicimad

Este proyecto incluye dos paquetes principales: Bicimad y Tests. A continuación, se describen las clases UrlEMT y Bicimad.

Clases

UrlEMT

La clase UrlEMT es responsable de manejar las URL relacionadas con el sistema de Bicimad.

Métodos

  • __init__(self, base_url: str, api_key: str): Constructor de la clase que inicializa la URL base y la clave de la API.
  • build_url(self, endpoint: str, params: dict) -> str: Construye una URL completa a partir de un endpoint y parámetros adicionales.

Bicimad

La clase Bicimad maneja la lógica principal para interactuar con el sistema Bicimad.

Métodos

  • __init__(self, url_emt: UrlEMT): Constructor de la clase que inicializa una instancia de UrlEMT.

  • get_bike_info(self, station_id: int) -> dict: Obtiene la información de las bicicletas en una estación específica.

  • get_station_status(self) -> dict: Obtiene el estado de todas las estaciones.

Ejemplos de Uso

from Bicimad import UrlEMT

# Inicialización del objeto class UrlEMT
emt = UrlEMT()

# Ejemplo de uso de get_url y get_csv
try:
    url = emt.get_url(2, 23)
    print('URL:', url)
    csv_file = emt.get_csv(2, 23)
    print('CSV content:', csv_file.read())
except ValueError as e:
    print('Error:', e)
except ConnectionError as e:
    print('Error:', e)


from Bicimad import Bicimad, UrlEMT
# Ejemplo de uso de la clase BiciMad
# Asumimos que el archivo CSV está disponible en la URL especificada en get_data

try:
    usos = BiciMad(month=2, year=23)
    df = usos.data
    print("Resumen de datos:")
    print(usos.resume())
except Exception as e:
    print("Error:", e)

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

my_bicimad_project-0.0.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

my_BiciMad_Project-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file my_bicimad_project-0.0.1.tar.gz.

File metadata

  • Download URL: my_bicimad_project-0.0.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for my_bicimad_project-0.0.1.tar.gz
Algorithm Hash digest
SHA256 702e6ad2dc070e7b2d7562c8b37f7e4f77bfa2fe07cb76b8fb30aaad51286449
MD5 85cf3cb7cd074db825edc716117913e4
BLAKE2b-256 691ea6f19115f2efec96a83479e4bbd1c1dcb6458b37003f5b3df306c19b332f

See more details on using hashes here.

File details

Details for the file my_BiciMad_Project-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for my_BiciMad_Project-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8164df7f7b5d9b5638b8030512ecaa563e101eef886d20b99db7782fae4dea3
MD5 b7a075a5558a29d44bd90e0bafe8fcdb
BLAKE2b-256 efa7dfbff35e86f745da09dd31672607097683c5edae7ef48e1f04b6d1917da9

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