[![image](https://github.com/tefra/xsdata-attrs/raw/main/docs/logo.svg)](https://xsdata-attrs.readthedocs.io/)
# xsdata powered by attrs!
[![image](https://github.com/tefra/xsdata-attrs/workflows/tests/badge.svg)](https://github.com/tefra/xsdata-attrs/actions)
[![image](https://readthedocs.org/projects/xsdata-attrs/badge)](https://xsdata-attrs.readthedocs.io/)
[![image](https://codecov.io/gh/tefra/xsdata-attrs/branch/main/graph/badge.svg)](https://codecov.io/gh/tefra/xsdata-attrs)
[![image](https://img.shields.io/github/languages/top/tefra/xsdata-attrs.svg)](https://xsdata-attrs.readthedocs.io/)
[![image](https://www.codefactor.io/repository/github/tefra/xsdata-attrs/badge)](https://www.codefactor.io/repository/github/tefra/xsdata-attrs)
[![image](https://img.shields.io/pypi/pyversions/xsdata-attrs.svg)](https://pypi.org/pypi/xsdata-attrs/)
[![image](https://img.shields.io/pypi/v/xsdata-attrs.svg)](https://pypi.org/pypi/xsdata-attrs/)
---
xsData is a complete data binding library for python allowing developers to access and
use XML and JSON documents as simple objects rather than using DOM.
Now powered by attrs!
```console
$ xsdata http://rss.cnn.com/rss/edition.rss --output attrs
Parsing document edition.rss
Analyzer input: 9 main and 0 inner classes
Analyzer output: 9 main and 0 inner classes
Generating package: init
Generating package: generated.rss
```
```python
@attr.s
class Rss:
class Meta:
name = "rss"
version: Optional[float] = attr.ib(
default=None,
metadata={
"type": "Attribute",
}
)
channel: Optional[Channel] = attr.ib(
default=None,
metadata={
"type": "Element",
}
)
```
```console
>>> from xsdata_attrs.bindings import XmlParser
>>> from urllib.request import urlopen
>>> from generated.rss import Rss
>>>
>>> parser = XmlParser()
>>> with urlopen("http://rss.cnn.com/rss/edition.rss") as rq:
... result = parser.parse(rq, Rss)
...
>>> result.channel.item[2].title
'Vatican indicts 10 people, including a Cardinal, over an international financial scandal'
>>> result.channel.item[2].pub_date
'Sat, 03 Jul 2021 16:37:14 GMT'
>>> result.channel.item[2].link
'https://www.cnn.com/2021/07/03/europe/vatican-financial-scandal-intl/index.html'
```
## Changelog: 24.3 (2024-03-10)
- Add missing parser/serializer shortcuts
- General project maintenance
Raw data
{
"_id": null,
"home_page": "",
"name": "xsdata-attrs",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "xsd,wsdl,schema,dtd,binding,xml,json,dataclasses,generator,cli,attrs",
"author": "",
"author_email": "Christodoulos Tsoulloftas <chris@komposta.net>",
"download_url": "https://files.pythonhosted.org/packages/e7/89/5d4b3a83f14c12c13d372064cd887ebbda55f7e47476d20eb3ae158bcc41/xsdata_attrs-24.3.tar.gz",
"platform": null,
"description": "[![image](https://github.com/tefra/xsdata-attrs/raw/main/docs/logo.svg)](https://xsdata-attrs.readthedocs.io/)\n\n# xsdata powered by attrs!\n\n[![image](https://github.com/tefra/xsdata-attrs/workflows/tests/badge.svg)](https://github.com/tefra/xsdata-attrs/actions)\n[![image](https://readthedocs.org/projects/xsdata-attrs/badge)](https://xsdata-attrs.readthedocs.io/)\n[![image](https://codecov.io/gh/tefra/xsdata-attrs/branch/main/graph/badge.svg)](https://codecov.io/gh/tefra/xsdata-attrs)\n[![image](https://img.shields.io/github/languages/top/tefra/xsdata-attrs.svg)](https://xsdata-attrs.readthedocs.io/)\n[![image](https://www.codefactor.io/repository/github/tefra/xsdata-attrs/badge)](https://www.codefactor.io/repository/github/tefra/xsdata-attrs)\n[![image](https://img.shields.io/pypi/pyversions/xsdata-attrs.svg)](https://pypi.org/pypi/xsdata-attrs/)\n[![image](https://img.shields.io/pypi/v/xsdata-attrs.svg)](https://pypi.org/pypi/xsdata-attrs/)\n\n---\n\nxsData is a complete data binding library for python allowing developers to access and\nuse XML and JSON documents as simple objects rather than using DOM.\n\nNow powered by attrs!\n\n```console\n$ xsdata http://rss.cnn.com/rss/edition.rss --output attrs\nParsing document edition.rss\nAnalyzer input: 9 main and 0 inner classes\nAnalyzer output: 9 main and 0 inner classes\nGenerating package: init\nGenerating package: generated.rss\n```\n\n```python\n@attr.s\nclass Rss:\n class Meta:\n name = \"rss\"\n\n version: Optional[float] = attr.ib(\n default=None,\n metadata={\n \"type\": \"Attribute\",\n }\n )\n channel: Optional[Channel] = attr.ib(\n default=None,\n metadata={\n \"type\": \"Element\",\n }\n )\n```\n\n```console\n\n>>> from xsdata_attrs.bindings import XmlParser\n>>> from urllib.request import urlopen\n>>> from generated.rss import Rss\n>>>\n>>> parser = XmlParser()\n>>> with urlopen(\"http://rss.cnn.com/rss/edition.rss\") as rq:\n... result = parser.parse(rq, Rss)\n...\n>>> result.channel.item[2].title\n'Vatican indicts 10 people, including a Cardinal, over an international financial scandal'\n>>> result.channel.item[2].pub_date\n'Sat, 03 Jul 2021 16:37:14 GMT'\n>>> result.channel.item[2].link\n'https://www.cnn.com/2021/07/03/europe/vatican-financial-scandal-intl/index.html'\n\n```\n\n## Changelog: 24.3 (2024-03-10)\n\n- Add missing parser/serializer shortcuts\n- General project maintenance\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "xsdata attrs plugin",
"version": "24.3",
"project_urls": {
"Changelog": "https://xsdata-attrs.readthedocs.io/en/latest/changelog/",
"Documentation": "https://xsdata-attrs.readthedocs.io/",
"Homepage": "https://github.com/tefra/xsdata-attrs",
"Source": "https://github.com/tefra/xsdata-attrs"
},
"split_keywords": [
"xsd",
"wsdl",
"schema",
"dtd",
"binding",
"xml",
"json",
"dataclasses",
"generator",
"cli",
"attrs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e6e6a49af7ff7eade8680a791dfaf9dc0ba9f24404b02b65680083d062d40f9",
"md5": "cd603d3e8d169f433ef705883a1333ed",
"sha256": "12a33b7b1b81f55c706cc193c21bb9ec53908c8f380da99839f4f14dff23c487"
},
"downloads": -1,
"filename": "xsdata_attrs-24.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cd603d3e8d169f433ef705883a1333ed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7985,
"upload_time": "2024-03-10T14:31:18",
"upload_time_iso_8601": "2024-03-10T14:31:18.195867Z",
"url": "https://files.pythonhosted.org/packages/3e/6e/6a49af7ff7eade8680a791dfaf9dc0ba9f24404b02b65680083d062d40f9/xsdata_attrs-24.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e7895d4b3a83f14c12c13d372064cd887ebbda55f7e47476d20eb3ae158bcc41",
"md5": "b9b88aef0f773162e2f628beeba8b269",
"sha256": "9137f95e8b2292bf62ef9a85cfa85995ccabfb5ed3ea76474ce3e09c017f4784"
},
"downloads": -1,
"filename": "xsdata_attrs-24.3.tar.gz",
"has_sig": false,
"md5_digest": "b9b88aef0f773162e2f628beeba8b269",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 18393,
"upload_time": "2024-03-10T14:31:19",
"upload_time_iso_8601": "2024-03-10T14:31:19.926506Z",
"url": "https://files.pythonhosted.org/packages/e7/89/5d4b3a83f14c12c13d372064cd887ebbda55f7e47476d20eb3ae158bcc41/xsdata_attrs-24.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-10 14:31:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tefra",
"github_project": "xsdata-attrs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "xsdata-attrs"
}