{ "info": { "author": "Sidney Li", "author_email": "sidneyli5432@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Manufacturing", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "pdxdisplay\n==========\n\n*A simple web application for viewing PDX (Product Data eXchange) XML\nfiles*\n\nIntroduction\n------------\n\nFrom `the Wikipedia article on\nPDX `__: \u201cthe PDX (Product\nData eXchange) standard for manufacturing is a multi-part standard,\nrepresented by the IPC 2570 series of specifications.\u201d\n\nAs the name implies, it is a standard for exchanging product definition\nbetween companies or organizations, and can include bill of material\n(BOM), approved manufacturer list, drawings, documents, etc.; pretty\nmuch anything can be included if desired.\n\nIn simple terms, a \\*.pdx file (usually exported from Agile/Oracle) is\nreally just a ZIP file that contains all the files (\u201cattachments\u201d)\nassociated with the product (assembly), plus a special XML file called\n**pdx.xml**. This XML file contains the particulars of the various Items\nand their properties/attributes, the relationship between the Items,\nwhich forms the bill-of-materials (BOM), and also information about the\nvarious files that are inside the PDX/ZIP file.\n\nThe DTD of this XML file (identified as \u201cDTD 2571 200111\u201d) can be found\non the `IPC\nwebsite `__.\nFree PDX viewers are available, one of the most popular being PDXViewer\nfrom `PDXplorer `__.\n\nSince the \\*.pdx file is simply a ZIP file, it is easy to extract all\nthe attachments (documents, schematics, drawings, etc.) from the ZIP\nfile, and there are several ways one can view XML files. However, trying\nto make sense of the assembly from a generic XML viewer is not really\nfeasible, and although there are specialized free (and non-free)\nviewers, there are times when you might want to extract the data for\nyour own use. To this end I have written a simple PDX XML file parser,\n`pypdx `__ for doing this (for\ndetails, please head over to the github page or the `Python Package\nIndex `__ site.\n\nThe *pypdx* program can be used as a Python module, but also as a\ncommand-line stand-alone program that is more or less ready to use. But\nafter storing the data into the database, you have to figure out how to\nview it. To make life easier for people who just want a quick view of\nwhat the items and bill of materials looks like, there is now a separate\nprogram **pdxdisplay** that will let you import and display the items.\n(I had wanted to call it *pdxviewer*, but `that name is already\ntaken `__.)\n\nThe *pdxdisplay* program is a web application written in\n`Flask `__ that provides a simple interface\n(via a web browser) to upload and display a PDX XML file. The program\ndepends on the *pypdx* module.\n\nPlease note that this is not intended to be a full-fledged viewer for\nPDX XML files (never mind managing the complete PDX file with all the\nattachements). In particular it does not run on HTTPS (although it is\ntrivial to do that with a simple add-on module), there is no user\nauthentication, and it does not allow any editing of the data. There is\nminimal sorting providing, but no additional filtering or searching.\nAlso note that some of the data from the PDX XML file is not included\n(see the *pypdx* module). In particular, none of the\n**AdditionalAttribute** fields in the XML file are included (I might add\nthose at a later time, but no promises).\n\nNevertheless, I hope this might still be useful to some people. This is\nof course provided at no cost, and with no warranty. Use at your own\nrisk!\n\nInstallation and Usage\n----------------------\n\nTo install the module and program, run\n\n::\n\n pip install pdxdisplay\n\nThis should install all the necessary dependencies, and create an\nexecutable pdxdisplay. Before you run this program, you will need a\ndatabase: either a `SQLite3 `__ database or a\n`PostgreSQL `__ database, as described in\ndocument for the *pypdx* module. You specify the DSN by setting up the\nenvironment variable **PDX_DSN**; the *pdxdisplay* program will not run\nwithout this.\n\nIf you are using the SQLite3 file-based database, do something like\nthis:\n\n::\n\n % set PDX_DSN=mydatabase.sqlite3 \n % pdxdisplay\n\n(the extension of the SQLite3 database file needs to end with the\nextension *.sqlite3* for the program to recognize it as a SQLite3 file).\nFor a PostgreSQL database, do something like this\n\n::\n\n % set PDX_DSN=\"dbname='pdx' user='pdxuser' host='localhost' password='billofmaterials' port=5432\"\n $ pdxdisplay\n\nIf you are connecting to the default PostgreSQL database *pdx* (as\nlisted above), you can also use the short-hand:\n\n::\n\n % set PDX_DSN=pg\n % pdxdisplay\n\nRunning the *pdxdisplay* program will start the Flask web server at\n\n::\n\n http://localhost:5000/\n\nYou can then connect to this URL with your web browser.\n\nBy default *Flask* does not accept external connections (i.e.,\nconnections from outside your computer). If you really want to accept\nexternal connections, set the environment variable *PDX_EXTACCESS* to 1:\n\n::\n\n % export PDX_EXACCESS=1\n\nbefore running *pdxdisplay* (but keep in mind that the connection is not\nencrypted, nor is there any authentication).\n\nNote that you do not really need to install the PostgreSQL component if\nyou do not care for the PostgreSQL database. You should still be able to\nuse the program without installing the *psycopg2* module, since it is\nnot imported unless you specify the PostgreSQL database option. But\nthere maybe dependencies issues when trying to install this through\n*pip*.\n\nIssues with Python2\n-------------------\n\nThe *pdxdisplay* program was tested primarily with Python3, and for best\nresults you should use the Python3. If you are running one of the Ubuntu\nderivates, it is likely that your *python* is Python2, and Python3 is\nlisted as *python3*. In this case you may try to change \u201c#!\u201d line in the\n*pdxdisplay* file to point to python3. The program *should* run under\nPython2 also, but there were some issues having to do with non-ASCII\ncharacters that caused the program to fail. Specifically, it seems that\nnon-ASCII characters sent to the *render_template()* method (from Flask)\nwill cause it to break. This only occurs with Python2; Python3 does not\nhave this problem.\n\nAs a work-around, the program will filter out all non-ASCII characters\nin the *description* fields (of the Item, Attachments, etc. tables), but\n**only if it detects the script running under Python2**. However, the\nprogram does not check for this in other fields. If there are non-ASCII\ncharacters in those fields, the program will likely crash (but, as I\nsaid, only if you are using Python2).\n\nEven in Python3, you may need to set your locale to UTF-8 when using a\nSQLite3 database file. In particular, if you are running this in a\n`Ubuntu docker container `__, set the\nenvironment variables:\n\n::\n\n % export LC_ALL=C.UTF-8\n % export LANG=C.UTF-8\n\nClosing Remarks\n---------------\n\nI have only seen a very small number of PDX files, and there does not\nseem to be any sample PDX files that you can download from the Internet\n(likely because the only PDX files available contain proprietary\nmanufacturing information!). Naturally the testing of the *pypdx* module\nand the *pdxdisplay* program has been very limited. While I believe the\nimplementation to be correct (if incomplete), there is always the\npossibility of bugs. So use at your own risk; you have been warned!\n\n(*Last Revised 2018-02-01*)\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sid5432/pdxdisplay", "keywords": "PDX package data exchange IPC IPC-2571 IPC-2570 Flask database postgreSQL sqlite3", "license": "", "maintainer": "", "maintainer_email": "", "name": "pdxdisplay", "package_url": "https://pypi.org/project/pdxdisplay/", "platform": "", "project_url": "https://pypi.org/project/pdxdisplay/", "project_urls": { "Homepage": "https://github.com/sid5432/pdxdisplay" }, "release_url": "https://pypi.org/project/pdxdisplay/0.0.1a2/", "requires_dist": [ "flask", "pypdx" ], "requires_python": "", "summary": "Simple web application for viewing PDX (Product Data eXchange) XML files", "version": "0.0.1a2" }, "last_serial": 3543706, "releases": { "0.0.1a1": [ { "comment_text": "", "digests": { "md5": "05ddf8743dee0ceaf05b98e65160c3dd", "sha256": "141c4f8b23a0854fb3dcaf982edfb95ae656f591550eb71401b68f26dce4bfee" }, "downloads": -1, "filename": "pdxdisplay-0.0.1a1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "05ddf8743dee0ceaf05b98e65160c3dd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25746, "upload_time": "2018-01-21T23:22:21", "url": "https://files.pythonhosted.org/packages/aa/7b/641313ef2a568df58d98ceb7676b0a5005dcb8c6d89a6611d0561acdf1d7/pdxdisplay-0.0.1a1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f572311efafcc6a12e1c6b5ce45f743d", "sha256": "c2d1ad2d9afe7a53fce0b9545d1b136687613cfd0787f4504338f8518fdee103" }, "downloads": -1, "filename": "pdxdisplay-0.0.1a1.tar.gz", "has_sig": false, "md5_digest": "f572311efafcc6a12e1c6b5ce45f743d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18494, "upload_time": "2018-01-21T23:22:22", "url": "https://files.pythonhosted.org/packages/a4/8f/a66e982c73e99403ed2d1f2fdff037cefb8b20178d5d47354b3a4da0f167/pdxdisplay-0.0.1a1.tar.gz" } ], "0.0.1a2": [ { "comment_text": "", "digests": { "md5": "728484a00770510e563c83f74fc92614", "sha256": "5cd65a7705cc6201a97a3b70e1853f38c114de03cab3e8dba03b9799fd52598f" }, "downloads": -1, "filename": "pdxdisplay-0.0.1a2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "728484a00770510e563c83f74fc92614", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26325, "upload_time": "2018-02-02T02:40:51", "url": "https://files.pythonhosted.org/packages/73/0c/c806d2e3742ed26594c69de2c7363126338a8b4fafbaf275ecca30a87010/pdxdisplay-0.0.1a2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0cc49c224d98d638928625cb7a935cd0", "sha256": "be3d9dd890803732c6e454e3ff702acfcd5aa81b2856d952d40d1dc1c3d4542f" }, "downloads": -1, "filename": "pdxdisplay-0.0.1a2.tar.gz", "has_sig": false, "md5_digest": "0cc49c224d98d638928625cb7a935cd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18999, "upload_time": "2018-02-02T02:40:53", "url": "https://files.pythonhosted.org/packages/78/86/8dc9fe63a0a2fa73cf88d292a47f00ffd4e7ff45095f98e2ff2c2ccc143f/pdxdisplay-0.0.1a2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "728484a00770510e563c83f74fc92614", "sha256": "5cd65a7705cc6201a97a3b70e1853f38c114de03cab3e8dba03b9799fd52598f" }, "downloads": -1, "filename": "pdxdisplay-0.0.1a2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "728484a00770510e563c83f74fc92614", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26325, "upload_time": "2018-02-02T02:40:51", "url": "https://files.pythonhosted.org/packages/73/0c/c806d2e3742ed26594c69de2c7363126338a8b4fafbaf275ecca30a87010/pdxdisplay-0.0.1a2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0cc49c224d98d638928625cb7a935cd0", "sha256": "be3d9dd890803732c6e454e3ff702acfcd5aa81b2856d952d40d1dc1c3d4542f" }, "downloads": -1, "filename": "pdxdisplay-0.0.1a2.tar.gz", "has_sig": false, "md5_digest": "0cc49c224d98d638928625cb7a935cd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18999, "upload_time": "2018-02-02T02:40:53", "url": "https://files.pythonhosted.org/packages/78/86/8dc9fe63a0a2fa73cf88d292a47f00ffd4e7ff45095f98e2ff2c2ccc143f/pdxdisplay-0.0.1a2.tar.gz" } ] }