Skip to main content

A simple mawaqit scraper for creating Calendar events and Alexa integration.

Project description

Stopwatch

A simple stopwatch for measuring code performance.

Installing

To install the library, you can just run the following command:

$ python3 -m pip install mawaqit_alexa

Examples

import datetime
import os
from typing import Literal

from examples import ttl_cache_config

from mawaqit_alexa.data_provider.scraping_mawaqit_provider import ScrapingMawaqitProvider
from mawaqit_alexa.data_provider.csv_mawaqit_provider import CsvMawaqitProvider
from mawaqit_alexa.exceptions.missing_param_exception import MissingParamException
from mawaqit_alexa.util.param import Param
from mawaqit_alexa.services.calendar_generator import MawaqitCalendarGenerator

## set directly the url of the mawaqit online link
data_url = 'https://mawaqit.net/fr/grande-mosquee-de-paris'
api_mawaqit_provider = ScrapingMawaqitProvider(data_url)
year_calendar = api_mawaqit_provider.get_current_year_calendar()
mosque_name = api_mawaqit_provider.masjid_endpoint
current_year = datetime.datetime.now().year
language: Literal['ar', 'en'] = 'ar'
output_file = f'./data/out/{mosque_name}_{language}_{Param.ALARM_BEFORE_MINUTES}_{current_year}.ics'
output_file = os.path.join(os.getcwd(), output_file)

# create the calendar
MawaqitCalendarGenerator.create_mawaqit_calendar(
    year_calendar=year_calendar,
    year=current_year,
    output_file=output_file,
    time_zone='Europe/Paris',
    language=language
)

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

mawaqit_alexa-1.0.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

mawaqit_alexa-1.0.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file mawaqit_alexa-1.0.0.tar.gz.

File metadata

  • Download URL: mawaqit_alexa-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mawaqit_alexa-1.0.0.tar.gz
Algorithm Hash digest
SHA256 92fb6091f49f93a434d99d45bf408a426e56c375c31161545385f0004b388e6a
MD5 9da7c380f2f7c94588be0221baa9839e
BLAKE2b-256 ee5efc0bdd98dc0144c9cd81cde6b957dbe29fb531ab75116b61f88dc4cbd337

See more details on using hashes here.

Provenance

The following attestation bundles were made for mawaqit_alexa-1.0.0.tar.gz:

Publisher: wheels.yml on Ahmad-Said/mawaqit_alexa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mawaqit_alexa-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mawaqit_alexa-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mawaqit_alexa-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2313072a4ae690c242b45ccc225125bb1c3fa16e68cc8a9bd05e1ae5d6257b7
MD5 03a8d34a32c32798fc6246163c996aad
BLAKE2b-256 49a33299e134e232d6426fbba54e3c0cc6a2c4f263e2b334754e7174e45e2ea0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mawaqit_alexa-1.0.0-py3-none-any.whl:

Publisher: wheels.yml on Ahmad-Said/mawaqit_alexa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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