{ "info": { "author": "Annouar", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "\n# sellsy-api\n> A tiny client to manage your Sellsy plateform using Python\n\nsellsy-api is a client for the official [Sellsy API](https://api.sellsy.com) in order to allow you to get and manipulate data from [Sellsy plateform](https://welcome.sellsy.com/). The official client was written in PHP, here is a client written in pure python.\n\n### Features\n- Allows you to connect with your Oauth private API keys\n- Access to all methods listed [here](https://api.sellsy.com/documentation/methods) with only a single function\n- Error handler\n\n### Requirements\n* [Python 2/3](https://www.python.org/),\n* A Python Package Manager ([pip](https://pip.pypa.io/en/stable/installing/), [pipenv](http://pipenv.readthedocs.io/en/latest/), [conda](https://conda.io/docs/), ..)\n\n\n## Installing\n\nIf you are using pip as PM:\n\n```shell\n# Connect to your virtualenv\n$ workon projectenv\n\n# Use pip to install the package\n$ pip install sellsy_api\n```\n\nOr if you are using pipenv (pip needs to be installed too):\n```shell\n\n$ cd /path/to/my/project\n$ pipenv install sellsy_api\n```\n\nVerify now if the package as been successfully installed\n```shell\n$ python\n>> import sellsy_api # Should not raise exception\n```\n\n## Quick Start\n\n```python\nimport os\nimport sellsy_api\n\nclient = sellsy_api.Client(\n 'my_consumer_token',\n 'my_consumer_secret',\n 'my_user_token',\n 'my_user_secret')\n\ntry:\n infos = client.api(method='Infos.getInfos')\n prospect = client.api(method='Prospects.getOne', params={ 'id': 55 })\nexcept sellsy_api.SellsyAuthenticateError as e: # raised if credential keys are not valid\n print('Authentication failed ! Details : {}'.format(e))\nexcept sellsy_api.SellsyError as e: # raised if an error is returned by Sellsy API (\n print(e)\n\nprospect_name = prospect['corporation']['name']\n\n```\n\nYou can access the full Sellsy API [methods](https://api.sellsy.com/documentation/methods) using `client.api(method='', params={})`. \n\nThe function returns a dictionary containing the response:\n```json\n{\n \"corporation\":{\n \"id\":\"55\",\n \"corpid\":\"644\",\n \"name\":\"New Prospect\",\n \"...\":\"...\",\n \"created\":\"2013-01-31 14:49:35\",\n \"updated\":\"2013-01-31 16:41:38\"\n },\n \"contacts\":[\n {\n \"id\":\"44\",\n \"prospectid\":\"55\",\n \"...\":\"...\",\n \"sign\":\"\",\n \"birthdate\":\"0000-00-00\"\n }\n ]\n}\n```\n\nFor now, two exceptions could be raised by calling the function:\n- `SellsyAuthenticateError` : if one of `consumer_key`, `consumer_secret`, `user_token` or `user_secret` is invalid or if authentication failed\n- `SellsyError`: Sellsy API could return error depends on unexcistant ressource or method not valid for example. So this exception is raised and you can access the exception infos to have more details or error : `{code} - {detail}` where `code` if one of code error described [here](https://api.sellsy.com/documentation/errors) (in Error Process tab).\n- _COMING SOON_: more exceptions to catch precise errors through distinct exceptions (example: SellsyRessourceNotFound if the ressource you asked for does not exists) and not only through a unique `SellsyError` with different messages... \n\n\n## Links\n\n- [Sellsy plateform](https://welcome.sellsy.com/)\n- [Sellsy API](https://api.sellsy.com)\n- [sellsy-api issue tracker](https://github.com/Annouar/sellsy-client/issues)\n\n\n## License\n\n - **MIT** : http://opensource.org/licenses/MIT\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Annouar/sellsy-api", "keywords": "Sellsy SellsyAPI SellsyClient sellsy_api sellsy_client", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sellsy-api", "package_url": "https://pypi.org/project/sellsy-api/", "platform": "", "project_url": "https://pypi.org/project/sellsy-api/", "project_urls": { "Bug Reports": "https://github.com/Annouar/sellsy-client/issues", "Homepage": "https://github.com/Annouar/sellsy-api" }, "release_url": "https://pypi.org/project/sellsy-api/0.0.2/", "requires_dist": [ "requests (>=2.21.0)", "requests-oauthlib (>=1.2.0)" ], "requires_python": "", "summary": "sellsy_api is a tiny client for Sellsy API", "version": "0.0.2" }, "last_serial": 5212555, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d790232c5aff2d91a242b2f3176e6aed", "sha256": "45fda952777d2fc4f1c18735875e1b47f603a677df5b0048ab85bcc4804a9f23" }, "downloads": -1, "filename": "sellsy_api-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d790232c5aff2d91a242b2f3176e6aed", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7977, "upload_time": "2018-03-01T01:19:42", "url": "https://files.pythonhosted.org/packages/46/2c/464cc47e566abf2ac88be79589b513e8032a1b0c51612107b470a87f1f84/sellsy_api-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c49f47fc16a03bc7450b29eff78d8e9e", "sha256": "f368cae930ea0afbdbd56521cae5c8076fadcbc238a52be7ee39bb790c86a4bd" }, "downloads": -1, "filename": "sellsy_api-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c49f47fc16a03bc7450b29eff78d8e9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8367, "upload_time": "2018-03-01T01:19:44", "url": "https://files.pythonhosted.org/packages/3f/da/8820566079eb696014301d913d84820e734b98526117d9e6e96c6bbf290a/sellsy_api-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3a29c61ef40d637b2cbb1981931fef36", "sha256": "fdb83be50258dfabaab96f87ef3b9094f76de2ebba38980fb722412c27f89460" }, "downloads": -1, "filename": "sellsy_api-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3a29c61ef40d637b2cbb1981931fef36", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5562, "upload_time": "2019-05-01T12:33:34", "url": "https://files.pythonhosted.org/packages/16/ad/9bb7b00bf00c0e055f07858924e550caf8294c3258aa9c09588706810015/sellsy_api-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5286a2041dbc4d59d91e2c53e9ec2d48", "sha256": "ed60f7d4c8a1d2697498f7058c042f9ae60c57802601ff9e7e854a398b0eb21b" }, "downloads": -1, "filename": "sellsy_api-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5286a2041dbc4d59d91e2c53e9ec2d48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8088, "upload_time": "2019-05-01T12:33:36", "url": "https://files.pythonhosted.org/packages/4e/3b/d65f3c0dfa13a669e497dd90aa96bcf83fa10a5c6dc445ae387488c15e75/sellsy_api-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3a29c61ef40d637b2cbb1981931fef36", "sha256": "fdb83be50258dfabaab96f87ef3b9094f76de2ebba38980fb722412c27f89460" }, "downloads": -1, "filename": "sellsy_api-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3a29c61ef40d637b2cbb1981931fef36", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5562, "upload_time": "2019-05-01T12:33:34", "url": "https://files.pythonhosted.org/packages/16/ad/9bb7b00bf00c0e055f07858924e550caf8294c3258aa9c09588706810015/sellsy_api-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5286a2041dbc4d59d91e2c53e9ec2d48", "sha256": "ed60f7d4c8a1d2697498f7058c042f9ae60c57802601ff9e7e854a398b0eb21b" }, "downloads": -1, "filename": "sellsy_api-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5286a2041dbc4d59d91e2c53e9ec2d48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8088, "upload_time": "2019-05-01T12:33:36", "url": "https://files.pythonhosted.org/packages/4e/3b/d65f3c0dfa13a669e497dd90aa96bcf83fa10a5c6dc445ae387488c15e75/sellsy_api-0.0.2.tar.gz" } ] }