PyAltiumRun


NamePyAltiumRun JSON
Version 0.1.5 PyPI version JSON
download
home_pagehttps://github.com/krakdustten/PyAltiumRun
SummaryA library that can run scripts in altium designer
upload_time2023-10-24 16:00:50
maintainer
docs_urlNone
authorDylan Gybels
requires_python>=3.6
licenseMIT
keywords altium scripting runner
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PyAltiumRun

[![PyPI version](https://badgen.net/pypi/v/PyAltiumRun)](https://pypi.org/project/PyAltiumRun/)  [![PyPI version](https://badgen.net/pypi/license/PyAltiumRun)](https://github.com/krakdustten/PyAltiumRun/blob/master/LICENSE) [![PyPI version](https://badgen.net/pypi/python/PyAltiumRun)](https://pypi.org/project/PyAltiumRun/)

A Python interface that can run Delphiscript scripts in [Altium Designer](https://www.altium.com/).

New features can be requested in the [Github Issues](https://github.com/krakdustten/PyAltiumRun/issues).

## Installation requirements

Altium designer must be installed before running this library.

## Quick start

~~~python
from PyAltiumRun.AltiumRun import AltiumRun

run = AltiumRun(use_internal_logger=True)                       #Create runner object
run.clear_log_file()                                            #Clear the logs of the previous run
run.set_project_to_open(r"Altium_project/Arduino_uno.PrjPcb")   #Define an Altium project to open
run.add_script(r"Altium_scripts/generate_docs.pas")             #Add a script to the runner
run.set_function("gen_docs", "Arduino_uno")                     #Set the function to run
run.run()                                                       #Run
~~~

## Delphi addons

These are the delphi script addons created.

### Logger

For this module to work the "use_internal_logger" parameter of the runner constructor should be True.

This module creates a log file in the data folder under the scripting project.
It logs everything in the following format:

~~~
[DAY/MONTH/YEAR HOUR:MINUTE:SECOND:MILISECOND]: LOGGED_STRING
~~~

Resulting in a log that looks like this:

~~~
[09/01/22 10:53:30.573]: Starting script
[09/01/22 10:53:30.576]: Opening project: Altium_project/Arduino_uno.PrjPcb
[09/01/22 10:53:30.657]: Arduino_uno
~~~

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/krakdustten/PyAltiumRun",
    "name": "PyAltiumRun",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Altium,Scripting,Runner",
    "author": "Dylan Gybels",
    "author_email": "dylangybels@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5e/2b/7005a25c5c56c0a775a57ffe7a36fe8f195f5ee93aa75dd59d2fdf5f26c9/PyAltiumRun-0.1.5.tar.gz",
    "platform": "win32",
    "description": "PyAltiumRun\r\n\r\n[![PyPI version](https://badgen.net/pypi/v/PyAltiumRun)](https://pypi.org/project/PyAltiumRun/)  [![PyPI version](https://badgen.net/pypi/license/PyAltiumRun)](https://github.com/krakdustten/PyAltiumRun/blob/master/LICENSE) [![PyPI version](https://badgen.net/pypi/python/PyAltiumRun)](https://pypi.org/project/PyAltiumRun/)\r\n\r\nA Python interface that can run Delphiscript scripts in [Altium Designer](https://www.altium.com/).\r\n\r\nNew features can be requested in the [Github Issues](https://github.com/krakdustten/PyAltiumRun/issues).\r\n\r\n## Installation requirements\r\n\r\nAltium designer must be installed before running this library.\r\n\r\n## Quick start\r\n\r\n~~~python\r\nfrom PyAltiumRun.AltiumRun import AltiumRun\r\n\r\nrun = AltiumRun(use_internal_logger=True)                       #Create runner object\r\nrun.clear_log_file()                                            #Clear the logs of the previous run\r\nrun.set_project_to_open(r\"Altium_project/Arduino_uno.PrjPcb\")   #Define an Altium project to open\r\nrun.add_script(r\"Altium_scripts/generate_docs.pas\")             #Add a script to the runner\r\nrun.set_function(\"gen_docs\", \"Arduino_uno\")                     #Set the function to run\r\nrun.run()                                                       #Run\r\n~~~\r\n\r\n## Delphi addons\r\n\r\nThese are the delphi script addons created.\r\n\r\n### Logger\r\n\r\nFor this module to work the \"use_internal_logger\" parameter of the runner constructor should be True.\r\n\r\nThis module creates a log file in the data folder under the scripting project.\r\nIt logs everything in the following format:\r\n\r\n~~~\r\n[DAY/MONTH/YEAR HOUR:MINUTE:SECOND:MILISECOND]: LOGGED_STRING\r\n~~~\r\n\r\nResulting in a log that looks like this:\r\n\r\n~~~\r\n[09/01/22 10:53:30.573]: Starting script\r\n[09/01/22 10:53:30.576]: Opening project: Altium_project/Arduino_uno.PrjPcb\r\n[09/01/22 10:53:30.657]: Arduino_uno\r\n~~~\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library that can run scripts in altium designer",
    "version": "0.1.5",
    "project_urls": {
        "Homepage": "https://github.com/krakdustten/PyAltiumRun"
    },
    "split_keywords": [
        "altium",
        "scripting",
        "runner"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e2b7005a25c5c56c0a775a57ffe7a36fe8f195f5ee93aa75dd59d2fdf5f26c9",
                "md5": "85b2444843ffbfdd82cc4a202219be28",
                "sha256": "65318d97b5ab291a32d0e0f3a378c0e66df2d25d246020c223e356e6fa331276"
            },
            "downloads": -1,
            "filename": "PyAltiumRun-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "85b2444843ffbfdd82cc4a202219be28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8402,
            "upload_time": "2023-10-24T16:00:50",
            "upload_time_iso_8601": "2023-10-24T16:00:50.344933Z",
            "url": "https://files.pythonhosted.org/packages/5e/2b/7005a25c5c56c0a775a57ffe7a36fe8f195f5ee93aa75dd59d2fdf5f26c9/PyAltiumRun-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-24 16:00:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "krakdustten",
    "github_project": "PyAltiumRun",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "pyaltiumrun"
}
        
Elapsed time: 0.21902s