# 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": ">=3.8,<4.0",
"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/e8/d0/413403d82e0015bd7a0a17eb608d48fae730439e074d8cad82e25cf6b122/django_oscar_odin-0.1.0b1.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.1.0b1",
"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": "38bb037575dfb094e9b6be4750cc2b14521121e2e5cacf9b57a516fff03d9124",
"md5": "c1f97186795a1f434b3470f8dcdfd05c",
"sha256": "2e6caeb9915684eedc48937c912ceb89e0fdbf5c32c5702dbc306faaed277196"
},
"downloads": -1,
"filename": "django_oscar_odin-0.1.0b1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c1f97186795a1f434b3470f8dcdfd05c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 58882,
"upload_time": "2024-02-23T10:42:38",
"upload_time_iso_8601": "2024-02-23T10:42:38.678490Z",
"url": "https://files.pythonhosted.org/packages/38/bb/037575dfb094e9b6be4750cc2b14521121e2e5cacf9b57a516fff03d9124/django_oscar_odin-0.1.0b1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e8d0413403d82e0015bd7a0a17eb608d48fae730439e074d8cad82e25cf6b122",
"md5": "c882140939dac2cc300d6949f21aae45",
"sha256": "eed269c469968cc6cf415cfad6c098992481c4afef903648b832f9d4ab7d7ffd"
},
"downloads": -1,
"filename": "django_oscar_odin-0.1.0b1.tar.gz",
"has_sig": false,
"md5_digest": "c882140939dac2cc300d6949f21aae45",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 52288,
"upload_time": "2024-02-23T10:42:40",
"upload_time_iso_8601": "2024-02-23T10:42:40.323161Z",
"url": "https://files.pythonhosted.org/packages/e8/d0/413403d82e0015bd7a0a17eb608d48fae730439e074d8cad82e25cf6b122/django_oscar_odin-0.1.0b1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-23 10:42:40",
"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"
}