# Oscar Odin
Mapping of Oscar eCommerce models to Odin resources.
## Installation
To install add `oscar_odin` to your installed apps
## Usage
```python
from oscar.core.loading import get_model
from oscar_odin.mappings import catalogue
Product = get_model("catalogue", "Product")
# Map a product to a resource.
product = Product.objects.get(id=1)
product_resource = catalogue.product_to_resource(product)
```
# Developing odin
## Using pip:
make install
make test
## Using poetry:
poetry install --all-extras
poetry run ./manage.py test
Raw data
{
"_id": null,
"home_page": "https://github.com/django-oscar/oscar-odin",
"name": "django-oscar-odin",
"maintainer": "Viggo de Vries",
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": "viggo@highbiza.nl",
"keywords": "data-structure, validation, data-mapping",
"author": "Tim Savage",
"author_email": "tim@savage.company",
"download_url": "https://files.pythonhosted.org/packages/a5/8a/cb9f88f703eed637908944c108a4d9e4efda48b8c8f0d2f719ee694331e0/django_oscar_odin-0.3.0.tar.gz",
"platform": null,
"description": "# Oscar Odin\n\nMapping of Oscar eCommerce models to Odin resources.\n\n## Installation\n\nTo install add `oscar_odin` to your installed apps\n\n## Usage\n\n```python\nfrom oscar.core.loading import get_model\nfrom oscar_odin.mappings import catalogue\n\nProduct = get_model(\"catalogue\", \"Product\")\n\n# Map a product to a resource.\nproduct = Product.objects.get(id=1)\nproduct_resource = catalogue.product_to_resource(product)\n```\n\n# Developing odin\n\n## Using pip:\n\nmake install\nmake test\n\n## Using poetry:\n\npoetry install --all-extras\npoetry run ./manage.py test\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Odin Resources and mappings to Oscar models",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/django-oscar/oscar-odin",
"Repository": "https://github.com/django-oscar/oscar-odin"
},
"split_keywords": [
"data-structure",
" validation",
" data-mapping"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5c1d20947ea78460458d648ae3a1144d164b098eb7eec9228dfd240e0f09bdcc",
"md5": "9f4ede3894d06286d9f6d7eacbb8acf8",
"sha256": "9fefde92b7f157368565c51ccf6fc1a8c91b78559f610c7dd1945397206e6e51"
},
"downloads": -1,
"filename": "django_oscar_odin-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f4ede3894d06286d9f6d7eacbb8acf8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 79548,
"upload_time": "2024-11-01T12:03:37",
"upload_time_iso_8601": "2024-11-01T12:03:37.476888Z",
"url": "https://files.pythonhosted.org/packages/5c/1d/20947ea78460458d648ae3a1144d164b098eb7eec9228dfd240e0f09bdcc/django_oscar_odin-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a58acb9f88f703eed637908944c108a4d9e4efda48b8c8f0d2f719ee694331e0",
"md5": "8aa6301afecb28ed32f20f2747ac624b",
"sha256": "905b3d6e728e278b9b92cc9313283985ba95c8e88f3f0f097bb6e857972f7752"
},
"downloads": -1,
"filename": "django_oscar_odin-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "8aa6301afecb28ed32f20f2747ac624b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 69595,
"upload_time": "2024-11-01T12:03:39",
"upload_time_iso_8601": "2024-11-01T12:03:39.536115Z",
"url": "https://files.pythonhosted.org/packages/a5/8a/cb9f88f703eed637908944c108a4d9e4efda48b8c8f0d2f719ee694331e0/django_oscar_odin-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-01 12:03:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "django-oscar",
"github_project": "oscar-odin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-oscar-odin"
}