python-amcards


Namepython-amcards JSON
Version 1.2.21 PyPI version JSON
download
home_pagehttps://github.com/simonesestili/python-amcards
SummaryA wrapper for the AMcards API.
upload_time2022-12-04 00:15:12
maintainer
docs_urlNone
authorSimone Sestili
requires_python
license
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/connected-applications/>`_.

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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simone Sestili",
    "author_email": "simone.sestili@amcards.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/8d/3f5cb73fb0f70d8e1c38f041abb4442b527d46fe2272c273c9071bf51b10/python-amcards-1.2.21.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/connected-applications/>`_.\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": "",
    "summary": "A wrapper for the AMcards API.",
    "version": "1.2.21",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "8454ce2320d73bc7d07315df019d9521",
                "sha256": "d9e9d26c8d139549fd204d7bc3f171c426ddfa6e1f9f17dc6a22105254fcbe0e"
            },
            "downloads": -1,
            "filename": "python_amcards-1.2.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8454ce2320d73bc7d07315df019d9521",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19351,
            "upload_time": "2022-12-04T00:15:09",
            "upload_time_iso_8601": "2022-12-04T00:15:09.946631Z",
            "url": "https://files.pythonhosted.org/packages/b0/c6/c3e496ca60b4ccac81f3d1722fc022811b551a63b06ad5b59c49cf5b780b/python_amcards-1.2.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "2a94d37bc39cdf19e8004ca99a7350e2",
                "sha256": "5e16b3693de9f30019910f6b6774666caa94254e855386d8b5ef18421c641364"
            },
            "downloads": -1,
            "filename": "python-amcards-1.2.21.tar.gz",
            "has_sig": false,
            "md5_digest": "2a94d37bc39cdf19e8004ca99a7350e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18534,
            "upload_time": "2022-12-04T00:15:12",
            "upload_time_iso_8601": "2022-12-04T00:15:12.271376Z",
            "url": "https://files.pythonhosted.org/packages/2d/8d/3f5cb73fb0f70d8e1c38f041abb4442b527d46fe2272c273c9071bf51b10/python-amcards-1.2.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-04 00:15:12",
    "github": true,
    "gitlab": false,
    "bitbucket": 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.04630s