django-connectwise


Namedjango-connectwise JSON
Version 1.6.9 PyPI version JSON
download
home_pagehttps://github.com/KerkhoffTechnologies/django-connectwise
SummaryDjango app for working with ConnectWise. Defines models (tickets, members, companies, etc.) and callbacks.
upload_time2024-11-04 21:21:10
maintainerNone
docs_urlNone
authorKerkhoff Technologies Inc.
requires_pythonNone
licenseMIT
keywords django connectwise rest api python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # django-connectwise

Django app for working with ConnectWise. Defines models (tickets,
members, companies, etc.) and callbacks.

## Requirements

-  Python 3.5
-  Django 2.0

Other versions may work; we haven't tried.

## Installation

From PyPI:

    pip install django-connectwise

From source:

    git clone git@github.com:KerkhoffTechnologies/django-connectwise.git
    cd django-connectwise
    python setup.py install

## Usage

1. Add to INSTALLED_APPS

    ```
    INSTALLED_APPS = [
        ...
        'djconnectwise',
        ...
    ]
    ```

1. Add to `urls.py`:

    ```
    re_path(
        r'^callback/',  # This can be whatever you want.
        include('djconnectwise.urls', namespace='connectwise')
    ),
    ```

1. Add to settings:

    ```
    CONNECTWISE_SERVER_URL = 'https://connectwise.example.com'
    CONNECTWISE_CREDENTIALS = {
        'company_id': 'your company ID',
        'api_public_key': 'your API user public key',
        'api_private_key': 'your API user private key',
    }
    CONNECTWISE_TICKET_PATH = 'v4_6_release/services/system_io/router/openrecord.rails'
    def djconnectwise_configuration():
        return {
            'timeout': 30.0,  # Network timeout in seconds
            'batch_size': 50,  # Number of records to fetch in each request
            'max_attempts': 3,  # Number of times to make a request before failing
            'callback_url': '{}?id='.format(
                reverse('connectwise:callback')
            ),
            'callback_host': '{}://{}'.format(
                'http' if DEBUG else 'https',
                'djconnectwise-host.example.com'
            ),
        }
    DJCONNECTWISE_CONF_CALLABLE = djconnectwise_configuration
    ```

    For ConnectWise Cloud users, `CONNECTWISE_SERVER_URL` can be just i.e. `https://na.myconnectwise.net`- the library changes to the `api-region` domain automatically.
      
    The `DJCONNECTWISE_CONF_CALLABLE` function should return a dictionary with the fields shown above. It's a callable so that it can fetch settings at runtime- for example from [Constance](https://github.com/jazzband/django-constance) settings.
1. Sync objects with this management command: `cwsync`. This will take a very long time if there are many objects to fetch.
1. Register your callbacks with the management command: `callbacks_registered`
1. Use standard Django model signals to see when objects change.
1. To control how user avatar thumbnails are stored, add settings from 
   [easy-thumbnails](https://easy-thumbnails.readthedocs.io/en/stable/ref/settings/).

To de-register your callbacks, use the `callbacks_deleted` management command.

## Testing

Prepare your environment:

```
pip install --upgrade -r requirements_test.txt
```

Try one of:

    ./runtests.py
    python setup.py test
    make test

## Contributing

- Fork this repo
- Make a branch
- Make your improvements

    Making migrations? Run:

    ```
    ./makemigrations.py
    ```

- Run the tests (see above)
- Make a pull request

## License

MIT

## Copyright

© 2017 Kerkhoff Technologies Inc.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KerkhoffTechnologies/django-connectwise",
    "name": "django-connectwise",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "django connectwise rest api python",
    "author": "Kerkhoff Technologies Inc.",
    "author_email": "matt@kerkhofftech.ca",
    "download_url": "https://files.pythonhosted.org/packages/05/59/d37450b811c205ea17c6369b2f8c07c3209273834670aa1d929acaf3f2f6/django-connectwise-1.6.9.tar.gz",
    "platform": null,
    "description": "# django-connectwise\n\nDjango app for working with ConnectWise. Defines models (tickets,\nmembers, companies, etc.) and callbacks.\n\n## Requirements\n\n-  Python 3.5\n-  Django 2.0\n\nOther versions may work; we haven't tried.\n\n## Installation\n\nFrom PyPI:\n\n    pip install django-connectwise\n\nFrom source:\n\n    git clone git@github.com:KerkhoffTechnologies/django-connectwise.git\n    cd django-connectwise\n    python setup.py install\n\n## Usage\n\n1. Add to INSTALLED_APPS\n\n    ```\n    INSTALLED_APPS = [\n        ...\n        'djconnectwise',\n        ...\n    ]\n    ```\n\n1. Add to `urls.py`:\n\n    ```\n    re_path(\n        r'^callback/',  # This can be whatever you want.\n        include('djconnectwise.urls', namespace='connectwise')\n    ),\n    ```\n\n1. Add to settings:\n\n    ```\n    CONNECTWISE_SERVER_URL = 'https://connectwise.example.com'\n    CONNECTWISE_CREDENTIALS = {\n        'company_id': 'your company ID',\n        'api_public_key': 'your API user public key',\n        'api_private_key': 'your API user private key',\n    }\n    CONNECTWISE_TICKET_PATH = 'v4_6_release/services/system_io/router/openrecord.rails'\n    def djconnectwise_configuration():\n        return {\n            'timeout': 30.0,  # Network timeout in seconds\n            'batch_size': 50,  # Number of records to fetch in each request\n            'max_attempts': 3,  # Number of times to make a request before failing\n            'callback_url': '{}?id='.format(\n                reverse('connectwise:callback')\n            ),\n            'callback_host': '{}://{}'.format(\n                'http' if DEBUG else 'https',\n                'djconnectwise-host.example.com'\n            ),\n        }\n    DJCONNECTWISE_CONF_CALLABLE = djconnectwise_configuration\n    ```\n\n    For ConnectWise Cloud users, `CONNECTWISE_SERVER_URL` can be just i.e. `https://na.myconnectwise.net`- the library changes to the `api-region` domain automatically.\n      \n    The `DJCONNECTWISE_CONF_CALLABLE` function should return a dictionary with the fields shown above. It's a callable so that it can fetch settings at runtime- for example from [Constance](https://github.com/jazzband/django-constance) settings.\n1. Sync objects with this management command: `cwsync`. This will take a very long time if there are many objects to fetch.\n1. Register your callbacks with the management command: `callbacks_registered`\n1. Use standard Django model signals to see when objects change.\n1. To control how user avatar thumbnails are stored, add settings from \n   [easy-thumbnails](https://easy-thumbnails.readthedocs.io/en/stable/ref/settings/).\n\nTo de-register your callbacks, use the `callbacks_deleted` management command.\n\n## Testing\n\nPrepare your environment:\n\n```\npip install --upgrade -r requirements_test.txt\n```\n\nTry one of:\n\n    ./runtests.py\n    python setup.py test\n    make test\n\n## Contributing\n\n- Fork this repo\n- Make a branch\n- Make your improvements\n\n    Making migrations? Run:\n\n    ```\n    ./makemigrations.py\n    ```\n\n- Run the tests (see above)\n- Make a pull request\n\n## License\n\nMIT\n\n## Copyright\n\n\u00a9 2017 Kerkhoff Technologies Inc.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Django app for working with ConnectWise. Defines models (tickets, members, companies, etc.) and callbacks.",
    "version": "1.6.9",
    "project_urls": {
        "Homepage": "https://github.com/KerkhoffTechnologies/django-connectwise"
    },
    "split_keywords": [
        "django",
        "connectwise",
        "rest",
        "api",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0559d37450b811c205ea17c6369b2f8c07c3209273834670aa1d929acaf3f2f6",
                "md5": "8a5d4b77792d5fa89e4394ce53e4334a",
                "sha256": "bebf5a4e6612cb67ed6fced5cf1e2ca5108f7c2a7891bf1d2346e50c61cfbcb6"
            },
            "downloads": -1,
            "filename": "django-connectwise-1.6.9.tar.gz",
            "has_sig": false,
            "md5_digest": "8a5d4b77792d5fa89e4394ce53e4334a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 320946,
            "upload_time": "2024-11-04T21:21:10",
            "upload_time_iso_8601": "2024-11-04T21:21:10.898942Z",
            "url": "https://files.pythonhosted.org/packages/05/59/d37450b811c205ea17c6369b2f8c07c3209273834670aa1d929acaf3f2f6/django-connectwise-1.6.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 21:21:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KerkhoffTechnologies",
    "github_project": "django-connectwise",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "django-connectwise"
}
        
Elapsed time: 0.43254s