python-amcards


Namepython-amcards JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/simonesestili/python-amcards
SummaryA wrapper for the AMcards API.
upload_time2025-01-01 06:20:53
maintainerNone
docs_urlNone
authorSimone Sestili
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements alabaster attrs Babel bleach build certifi charset-normalizer colorama commonmark docutils exceptiongroup idna imagesize importlib-metadata iniconfig jaraco.classes Jinja2 keyring MarkupSafe more-itertools packaging pep517 pkginfo pluggy Pygments pyparsing pytest pytz pywin32-ctypes readme-renderer requests requests-toolbelt rfc3986 rich six snowballstemmer Sphinx sphinxcontrib-applehelp sphinxcontrib-devhelp sphinxcontrib-htmlhelp sphinxcontrib-jsmath sphinxcontrib-qthelp sphinxcontrib-serializinghtml tomli twine urllib3 webencodings zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Getting Started | See the full docs at `Read the Docs <https://python-amcards.readthedocs.io/en/latest/>`_
==========================================================================================================
.. image:: https://i.ibb.co/tCrVfj6/readthedocs.png
    :target: https://python-amcards.readthedocs.io/en/latest/

Installation
------------
To install python-amcards, simply run this command in your terminal:

.. code-block::

    $ pip install python-amcards

Usage
-----
All interactions with the AMcards API are made through the `AMcardsClient <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_ class.

First, create an `AMcardsClient <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_ as follows:

.. code-block::

    >>> from amcards import AMcardsClient
    >>> client = AMcardsClient('youraccesstoken')

Here ``'youraccesstoken'`` will be replaced with a string containing your AMcards access token. You can generate one `here <https://amcards.com/user/generate-access-token/>`_.

Now we can perform all operations supported by the `client <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_.

Let's try using ``send_card`` to send a card to a single recipient:

.. code-block::

        >>> res = client.send_card(
        ...     template_id='123',
        ...     initiator='myintegration123',
        ...     shipping_address={
        ...         'first_name': 'Ralph',
        ...         'last_name': 'Mullins',
        ...         'address_line_1': '2285 Reppert Road',
        ...         'city': 'Southfield',
        ...         'state': 'MI',
        ...         'postal_code': '48075',
        ...         'country': 'US'
        ...     }
        ... )
        >>> res.card_id
        1522873
        >>> res.total_cost
        442
        >>> res.message
        'Card created successfully!'
        >>> res.user_email
        'example@example.com'
        >>> res.shipping_address
        {'last_name': 'Mullins', 'address_line_1': '2285 Reppert Road', 'first_name': 'Ralph', 'country': 'US', 'state': 'MI', 'postal_code': '48075', 'city': 'Southfield'}

The `AMcardsClient <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_ supports many more operations, for full documentation see `Read the Docs <https://python-amcards.readthedocs.io/en/latest/>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/simonesestili/python-amcards",
    "name": "python-amcards",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Simone Sestili",
    "author_email": "simone.sestili@amcards.com",
    "download_url": "https://files.pythonhosted.org/packages/e1/34/1b136e37ef983c2087d67d6a3b3d3cfbefda74311903fca7fe7d4446b342/python_amcards-1.5.0.tar.gz",
    "platform": null,
    "description": "Getting Started | See the full docs at `Read the Docs <https://python-amcards.readthedocs.io/en/latest/>`_\n==========================================================================================================\n.. image:: https://i.ibb.co/tCrVfj6/readthedocs.png\n    :target: https://python-amcards.readthedocs.io/en/latest/\n\nInstallation\n------------\nTo install python-amcards, simply run this command in your terminal:\n\n.. code-block::\n\n    $ pip install python-amcards\n\nUsage\n-----\nAll interactions with the AMcards API are made through the `AMcardsClient <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_ class.\n\nFirst, create an `AMcardsClient <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_ as follows:\n\n.. code-block::\n\n    >>> from amcards import AMcardsClient\n    >>> client = AMcardsClient('youraccesstoken')\n\nHere ``'youraccesstoken'`` will be replaced with a string containing your AMcards access token. You can generate one `here <https://amcards.com/user/generate-access-token/>`_.\n\nNow we can perform all operations supported by the `client <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_.\n\nLet's try using ``send_card`` to send a card to a single recipient:\n\n.. code-block::\n\n        >>> res = client.send_card(\n        ...     template_id='123',\n        ...     initiator='myintegration123',\n        ...     shipping_address={\n        ...         'first_name': 'Ralph',\n        ...         'last_name': 'Mullins',\n        ...         'address_line_1': '2285 Reppert Road',\n        ...         'city': 'Southfield',\n        ...         'state': 'MI',\n        ...         'postal_code': '48075',\n        ...         'country': 'US'\n        ...     }\n        ... )\n        >>> res.card_id\n        1522873\n        >>> res.total_cost\n        442\n        >>> res.message\n        'Card created successfully!'\n        >>> res.user_email\n        'example@example.com'\n        >>> res.shipping_address\n        {'last_name': 'Mullins', 'address_line_1': '2285 Reppert Road', 'first_name': 'Ralph', 'country': 'US', 'state': 'MI', 'postal_code': '48075', 'city': 'Southfield'}\n\nThe `AMcardsClient <https://python-amcards.readthedocs.io/en/latest/amcards.html#amcards.amcards.AMcardsClient>`_ supports many more operations, for full documentation see `Read the Docs <https://python-amcards.readthedocs.io/en/latest/>`_.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A wrapper for the AMcards API.",
    "version": "1.5.0",
    "project_urls": {
        "Homepage": "https://github.com/simonesestili/python-amcards"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f1ed7574ff44ee4d65a9058abc5b213130b9e8fd9b4ffea660907ed5dee24cb",
                "md5": "e5b1d13fcefcb8addcc6ba5359b91039",
                "sha256": "de9fe8718ab6104a8018ea101dfd77e9ab9f1e725f45f70ca6c86f03e4c4b0b5"
            },
            "downloads": -1,
            "filename": "python_amcards-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e5b1d13fcefcb8addcc6ba5359b91039",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21627,
            "upload_time": "2025-01-01T06:20:51",
            "upload_time_iso_8601": "2025-01-01T06:20:51.194201Z",
            "url": "https://files.pythonhosted.org/packages/1f/1e/d7574ff44ee4d65a9058abc5b213130b9e8fd9b4ffea660907ed5dee24cb/python_amcards-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1341b136e37ef983c2087d67d6a3b3d3cfbefda74311903fca7fe7d4446b342",
                "md5": "5728cf1a83f211a589bebf2ef74482a0",
                "sha256": "965c3024c8f4d3c22890f988081267d9ac4efa94571ee1d09b1c7a13d6546f4e"
            },
            "downloads": -1,
            "filename": "python_amcards-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5728cf1a83f211a589bebf2ef74482a0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21026,
            "upload_time": "2025-01-01T06:20:53",
            "upload_time_iso_8601": "2025-01-01T06:20:53.779294Z",
            "url": "https://files.pythonhosted.org/packages/e1/34/1b136e37ef983c2087d67d6a3b3d3cfbefda74311903fca7fe7d4446b342/python_amcards-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-01 06:20:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonesestili",
    "github_project": "python-amcards",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "alabaster",
            "specs": [
                [
                    "==",
                    "0.7.12"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "22.1.0"
                ]
            ]
        },
        {
            "name": "Babel",
            "specs": [
                [
                    "==",
                    "2.10.3"
                ]
            ]
        },
        {
            "name": "bleach",
            "specs": [
                [
                    "==",
                    "5.0.1"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2022.9.24"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "commonmark",
            "specs": [
                [
                    "==",
                    "0.9.1"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.19"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "imagesize",
            "specs": [
                [
                    "==",
                    "1.4.1"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "jaraco.classes",
            "specs": [
                [
                    "==",
                    "3.2.3"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "23.9.3"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "9.0.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "21.3"
                ]
            ]
        },
        {
            "name": "pep517",
            "specs": [
                [
                    "==",
                    "0.13.0"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.8.3"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.13.0"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.0.9"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.2.0"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2022.5"
                ]
            ]
        },
        {
            "name": "pywin32-ctypes",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "readme-renderer",
            "specs": [
                [
                    "==",
                    "37.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.28.1"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "0.10.1"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "12.6.0"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "snowballstemmer",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "Sphinx",
            "specs": [
                [
                    "==",
                    "5.3.0"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-applehelp",
            "specs": [
                [
                    "==",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-devhelp",
            "specs": [
                [
                    "==",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-htmlhelp",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-jsmath",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-qthelp",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-serializinghtml",
            "specs": [
                [
                    "==",
                    "1.1.5"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "4.0.1"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.12"
                ]
            ]
        },
        {
            "name": "webencodings",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.10.0"
                ]
            ]
        }
    ],
    "lcname": "python-amcards"
}
        
Elapsed time: 0.35803s