Skip to main content

CLI interface to https://www.paybyphone.fr/

Project description

PayByBot 3

Originally forked from paybybot2, this packages implements a CLI interface to paybyphone, allowing you (for example) to automate parking.

Installation

pip install paybybot3

Usage

CONFIG_NAME is the name of your configuration, it would be example_account in the example configuration below.

--location is often the district (eg 75001). There are some special values that you can find out in the output of check as locationId.

Similarly, you can find --rate as rateOptionId in the output of check.

alert

Usage: paybybot3 alert [OPTIONS] CONFIG_NAME

  1. Check if there is an ongoing subscription

  2. Else send a notification

Options:
  --location TEXT
  --config TEXT
  --help           Show this message and exit.

check

Usage: paybybot3 check [OPTIONS] CONFIG_NAME

  Check if there is an ongoing subscription

Options:
  --location TEXT
  --config TEXT
  --help           Show this message and exit.

pay

Usage: paybybot3 pay [OPTIONS] CONFIG_NAME

  1. Check if there is an ongoing subscription

  2. Else pay

  3. Check that the payment succeeded

  4. Notify on failure

Options:
  --location TEXT              [required]
  --rate INTEGER               [required]
  --duration TEXT              [required]
  --unit [Days|Hours|Minutes]  Default: Days
  --buffer
  --config TEXT
  --help                       Show this message and exit.

vehicles

Usage: paybybot3 vehicles [OPTIONS] CONFIG_NAME

  1. Show the vehicles

Options:
  --config TEXT
  --help           Show this message and exit.

payment-accounts

Usage: paybybot3 payment-accounts [OPTIONS] CONFIG_NAME

  Show the payment accounts

Options:
  --config TEXT
  --help         Show this message and exit.

Configuration

paybybot3 allows you to store your configuration in a YAML file ~/.config/paybybot3.yml.

Here is an example:

example_account:
  plate: AB123CD
  paybyphone:
    login: "+330612345678"
    password: password
  apprise: #optional
    services:
      - mail:
          service_url: "mailtos://{user}:{password}@{domain}?name=PayByBot3"
          tag:
            - "broadcast-warning"
            - "broadcast-failure"
      - discord:
          service_url: "discord://{WebhookID}/{WebhookToken}"
          tag:
            - "broadcast-info"
            - "broadcast-success"
            - "broadcast-warning"
            - "broadcast-failure"
      - ...
  paymentAccountId: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"

Notifications are delivered through the Apprise library.
If apprise is configured, at least one service must be configured. Service URLs can be found in the Apprise notification services documentation - refer to their documentation for required and additional parameters. Tags are mandatory and must at least be one of broadcast-info, broadcast-success, broadcast-warning or broadcast-failure, they are used to filter the notifications you want to receive.

The paymentAccountId can be found in the output of the payment-accounts command.

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

paybybot3-0.1.4.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

paybybot3-0.1.4-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file paybybot3-0.1.4.tar.gz.

File metadata

  • Download URL: paybybot3-0.1.4.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for paybybot3-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ac0b87d31011c4f73e77c17bee439cf883797500d81bde73034fc712fa85cf80
MD5 afc9b1bfe8c5166fc833263e5a855b2e
BLAKE2b-256 51e42ee153236344d19730adb323c92d837f05fe76984405e9bd8fe022f306c7

See more details on using hashes here.

File details

Details for the file paybybot3-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: paybybot3-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for paybybot3-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 638e20a5b186df5655ebbdf4bcbd993e6ea3f11bba8a0ca3322f23c5ecc500c3
MD5 cbab5d16673cd4a888e1014a1206e796
BLAKE2b-256 cfbc94c0872e4f2d6fb0c0e20dab02bae147e3a309fcded62a520f7ee477790c

See more details on using hashes here.

Supported by

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