Skip to main content

A CLI and library for Anypayx.com APIs

Project description

Anypayx

A Python library and CLI for interacting with Anypayx.com WebSockets and REST APIs.

Installation

To install the package, use pip:

pip install anypayx

Usage

CLI

The CLI provides commands to create invoices and subscribe to invoices or accounts.

Create Invoice

anypayx create-invoice --amount 100 --currency USD

Subscribe to Invoice

anypayx subscribe-invoice --invoice-id 12345

Subscribe to Account

anypayx subscribe-account --account-id 67890

Library

You can also use the library in your Python code:

from anypayx.api import AnypayxAPI

api = AnypayxAPI(api_key='your_api_key')
invoice = api.create_invoice(amount=100, currency='USD')
print(invoice)

ws_invoice = api.subscribe_invoice(invoice_id='12345')
print("Subscribed to invoice")

ws_account = api.subscribe_account(account_id='67890')
print("Subscribed to account")

Development and Publication

Prerequisites

Ensure you have the latest versions of setuptools, wheel, and twine:

pip install --upgrade setuptools wheel twine

Building the Package

Navigate to the root directory of your project (where your setup.py is located) and run:

python setup.py sdist bdist_wheel

This will generate distribution archives in the dist/ directory.

Register on PyPI

If you haven't already, create an account on PyPI.

Uploading to PyPI

Use twine to upload your package:

twine upload dist/*

You will be prompted to enter your PyPI username and password. If you have two-factor authentication enabled, you will also need to provide a code.

Verify Your Package

After uploading, verify that your package is available on PyPI by visiting https://pypi.org/project/anypayx/.

Testing Installation

To test the installation of your package, create a virtual environment and install it:

python -m venv test-env
source test-env/bin/activate  # On Windows use `test-env\Scripts\activate`
pip install anypayx

Using TestPyPI

Before uploading to the main PyPI, you can test your package on TestPyPI:

Upload to TestPyPI:

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Install from TestPyPI:

pip install --index-url https://test.pypi.org/simple/ anypayx

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

anypayx-0.0.1.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.

anypayx-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anypayx-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for anypayx-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5edb6a2a39bb4867eb927053a4ab7fef83d6ecb1e053a8bf1c8cc8bdb167e7bf
MD5 fefcd51c8419ef03a4cac7343fed9c15
BLAKE2b-256 7e92d0179eab76c19ae6efa35dcc527fe5ad8ab2a0452a601a26f891c55e0f9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anypayx-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for anypayx-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b71e739f16d4534deb2faea29bba478063be58c1b484c648e81c4fe29f974fb
MD5 394ab39b805dbac090b71ce7039b7cf7
BLAKE2b-256 af9b5d00a1874a887a625afdcd2ac282ffa1c0c6630378c345a9065b16ca9c8e

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