{ "info": { "author": "Miguel Ferrer", "author_email": "ingferrermiguel@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# magento-python\n\nmagento-python is an API wrapper for Magento written in Python\n\n## Installing\n```\npip install magento-python\n```\n\n## Usage\n```\nfrom magento.client import Client\n\nclient = Client('SERVER_URL', 'ACCESS_TOKEN') # Host must have trailing slash\n```\n\n### Search product\nAll\n```\nresponse = client.search_product({'searchCriteria': ''})\n```\n\nOrder by created_at, just one item\n```\nresponse = client.search_product({'searchCriteria[sortOrders][0][field]': 'created_at', 'searchCriteria[pageSize]': '1'})\n```\n\nFilter by created_date greater than 2018-02-26 15:31:09, up to 100 items\n```\nresponse = client.search_product({'searchCriteria[filter_groups][0][filters][0][field]': 'created_at', 'searchCriteria[filter_groups][0][filters][0][value]': '2018-02-26 15:31:09', 'searchCriteria[filter_groups][0][filters][0][condition_type]': 'gt', 'searchCriteria[pageSize]': '100'})\n```\n\n### Create Product\n```\ndata = {\n \"product\": {\n \"name\": 'Perfume Antonio Banderas',\n \"sku\": 'PAB',\n 'type_id': 'simple',\n 'attribute_set_id': '4',\n 'price': '100000'\n }\n}\nresponse = client.create_product(data)\n```\n\n### Get Product\nBy SKU\n```\nresponse = client.get_product('SKU')\n```\n\n### Delete Product\nBy SKU\n```\nresponse = client.delete_product('SKU')\n```\n\n### Search customer\nAll\n```\nresponse = client.search_customer({'searchCriteria': ''})\n```\n\n### Create customer\n```\ndata = {\n \"customer\": {\n \"email\": \"janedoe@jd.com\",\n \"firstname\": \"Jane\",\n \"lastname\": \"Doe\",\n \"addresses\": [{\n \"defaultShipping\": True,\n \"defaultBilling\": True,\n \"firstname\": \"Jane\",\n \"lastname\": \"Doe\",\n \"region\": {\n \"regionCode\": \"NY\",\n \"region\": \"New York\",\n \"regionId\": 43\n },\n \"postcode\": \"10755\",\n \"street\": [\"123 Oak Ave\"],\n \"city\": \"Purchase\",\n \"telephone\": \"512-555-1111\",\n \"countryId\": \"US\"\n }]\n },\n \"password\": \"Password1\"\n}\nresponse = client.create_customer(data)\n```\n\n### Get customer\nBy ID\n```\nresponse = client.get_customer('CUSTOMER_ID')\n```\n\n### Delete Product\nBy ID\n```\nresponse = client.delete_customer('CUSTOMER_ID')\n```\n\n### Search order\nAll\n```\nresponse = client.search_order({'searchCriteria': ''})\n```\n\n### Get order\nBy ID\n```\nresponse = client.get_order('ORDER_ID')\n```\n\n### Get product types\nAll\n```\nresponse = client.get_product_types({'searchCriteria': ''})\n```\n\n\n\n### Get product attribute sets\nAll\n```\nresponse = client.get_product_attribute_sets({'searchCriteria': ''})\n```\n\n\n\n### Get customer groups\nAll\n```\nresponse = client.get_customer_groups({'searchCriteria': ''})\n```\n\n## Contributing\n```\nFork it ( https://github.com/GearPlug/magento-python/fork )\nCreate your feature branch (git checkout -b my-new-feature)\nCommit your changes (git commit -am 'Add some feature')\nPush to the branch (git push origin my-new-feature)\nCreate a new Pull Request\n```", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/GearPlug/magento-python", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "magento-python", "package_url": "https://pypi.org/project/magento-python/", "platform": "", "project_url": "https://pypi.org/project/magento-python/", "project_urls": { "Homepage": "https://github.com/GearPlug/magento-python" }, "release_url": "https://pypi.org/project/magento-python/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "API wrapper for Magento Graph written in Python", "version": "0.1.0" }, "last_serial": 3640434, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "29023cf2b7abb5210ed8fec49881e0ae", "sha256": "fc78ddb91c2fa6e101221862a017b76c861c7302167c347fa51a1f8ac87f357a" }, "downloads": -1, "filename": "magento-python-0.1.0.tar.gz", "has_sig": false, "md5_digest": "29023cf2b7abb5210ed8fec49881e0ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3792, "upload_time": "2018-03-05T13:41:06", "url": "https://files.pythonhosted.org/packages/bd/04/ebbb88ddada39eb39bef16da3f2c4f39125ce4138e0d194c4ec653223125/magento-python-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "29023cf2b7abb5210ed8fec49881e0ae", "sha256": "fc78ddb91c2fa6e101221862a017b76c861c7302167c347fa51a1f8ac87f357a" }, "downloads": -1, "filename": "magento-python-0.1.0.tar.gz", "has_sig": false, "md5_digest": "29023cf2b7abb5210ed8fec49881e0ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3792, "upload_time": "2018-03-05T13:41:06", "url": "https://files.pythonhosted.org/packages/bd/04/ebbb88ddada39eb39bef16da3f2c4f39125ce4138e0d194c4ec653223125/magento-python-0.1.0.tar.gz" } ] }