SolidWrap


NameSolidWrap JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryThis module wraps the SolidWorks and PDM APIs for a streamlined, Pythonic workflow.
upload_time2023-06-24 16:14:19
maintainer
docs_urlNone
authorSean Yeatts
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SolidWrap
=========

*Copyright (c) 2023 Sean Yeatts. All rights reserved.*

This module wraps the SolidWorks and PDM APIs for a streamlined, Pythonic workflow.

Key Features
------------
- Intuitive Pythonic syntax for interacting with SolidWorks models & PDM states.
- Logging and report generation for profiling automation performance.
- Full API documentation detailing module components.

Navigate to the `API Reference <https://github.com/SeanYeatts/SolidWrap/blob/main/info/API%20Reference.rst#api-reference--solidwrap->`_ for a complete walkthrough of the module.

Quickstart
----------

Key ``import`` statements :

.. code:: python

  import solidwrap                         # top level module import
  from solidwrap import solidworks, vault  # explicit access to SolidWorks and PDM processes

The following methods must be called before you can utilize the SolidWrap API :

.. code:: python

  solidworks.connect(version=2021):  # connect to SolidWorks application
  vault.connect("VAULT_NAME_HERE")   # connect to PDM Vault ( case sensitive )

Example - a simple script that opens, rebuilds, saves, and closes a '.sldprt' file :

.. code:: python

  # Performs a simple example operation
  def example():
      file = sw.Filepath(f"C:\My_Vault\Test_Part_01.sldprt")  # create a Filepath object for the target file

      vault.checkout(file)                                    # check out
      if my_model := solidworks.open(file)                    # if the file opens succesfully...
          solidworks.safeclose(my_model)                      # ... then safeclose ( rebuild, save, close )
      vault.checkin(file)                                     # check in

  # MAIN
  def main():
      if not solidworks.connect(2021):                        # connect to SW
          vault.connect("My_Vault")                           # connect to Vault
          example()                                           # do something

      # Only include these statements if you truly want to quit both processes; they are not mandatory.
      solidworks.disconnect()                                 # terminate SW connection
      vault.disconnect()                                      # terminate Vault connection



Installation
------------
**Prerequisites**

- Python 3.8 or higher is recommended
- pip 23.0 or higher is recommended

**For a pip installation**

Open a new Command Prompt. Run the following command:

.. code:: sh

  py -m pip install solidwrap

**For a local installation**

Extract the contents of this module to a safe location. Open a new terminal and navigate to the top level directory of your project. Run the following command:

.. code:: sh

  py -m pip install "DIRECTORY_HERE\solidwrap\dist\solidwrap-0.0.1.tar.gz"

- ``DIRECTORY_HERE`` should be replaced with the complete filepath to the folder where you saved the SolidWrap module contents.
- Depending on the version of SolidWrap you've chosen, you may have to change ``0.0.1`` to reflect your specific version.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "SolidWrap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Sean Yeatts",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/10/2b/d016557bcb557d5d6e7abcb5e062a371016dfcf37b741adc7ea5af1cec7a/solidwrap-0.0.2.tar.gz",
    "platform": null,
    "description": "SolidWrap\n=========\n\n*Copyright (c) 2023 Sean Yeatts. All rights reserved.*\n\nThis module wraps the SolidWorks and PDM APIs for a streamlined, Pythonic workflow.\n\nKey Features\n------------\n- Intuitive Pythonic syntax for interacting with SolidWorks models & PDM states.\n- Logging and report generation for profiling automation performance.\n- Full API documentation detailing module components.\n\nNavigate to the `API Reference <https://github.com/SeanYeatts/SolidWrap/blob/main/info/API%20Reference.rst#api-reference--solidwrap->`_ for a complete walkthrough of the module.\n\nQuickstart\n----------\n\nKey ``import`` statements :\n\n.. code:: python\n\n  import solidwrap                         # top level module import\n  from solidwrap import solidworks, vault  # explicit access to SolidWorks and PDM processes\n\nThe following methods must be called before you can utilize the SolidWrap API :\n\n.. code:: python\n\n  solidworks.connect(version=2021):  # connect to SolidWorks application\n  vault.connect(\"VAULT_NAME_HERE\")   # connect to PDM Vault ( case sensitive )\n\nExample - a simple script that opens, rebuilds, saves, and closes a '.sldprt' file :\n\n.. code:: python\n\n  # Performs a simple example operation\n  def example():\n      file = sw.Filepath(f\"C:\\My_Vault\\Test_Part_01.sldprt\")  # create a Filepath object for the target file\n\n      vault.checkout(file)                                    # check out\n      if my_model := solidworks.open(file)                    # if the file opens succesfully...\n          solidworks.safeclose(my_model)                      # ... then safeclose ( rebuild, save, close )\n      vault.checkin(file)                                     # check in\n\n  # MAIN\n  def main():\n      if not solidworks.connect(2021):                        # connect to SW\n          vault.connect(\"My_Vault\")                           # connect to Vault\n          example()                                           # do something\n\n      # Only include these statements if you truly want to quit both processes; they are not mandatory.\n      solidworks.disconnect()                                 # terminate SW connection\n      vault.disconnect()                                      # terminate Vault connection\n\n\n\nInstallation\n------------\n**Prerequisites**\n\n- Python 3.8 or higher is recommended\n- pip 23.0 or higher is recommended\n\n**For a pip installation**\n\nOpen a new Command Prompt. Run the following command:\n\n.. code:: sh\n\n  py -m pip install solidwrap\n\n**For a local installation**\n\nExtract the contents of this module to a safe location. Open a new terminal and navigate to the top level directory of your project. Run the following command:\n\n.. code:: sh\n\n  py -m pip install \"DIRECTORY_HERE\\solidwrap\\dist\\solidwrap-0.0.1.tar.gz\"\n\n- ``DIRECTORY_HERE`` should be replaced with the complete filepath to the folder where you saved the SolidWrap module contents.\n- Depending on the version of SolidWrap you've chosen, you may have to change ``0.0.1`` to reflect your specific version.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This module wraps the SolidWorks and PDM APIs for a streamlined, Pythonic workflow.",
    "version": "0.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/SeanYeatts/SolidWrap/tree/main",
        "Homepage": "https://github.com/SeanYeatts/SolidWrap/tree/main"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cdafcbb39100614b6dbda72f00902e5cf58bc6f8cb9104f893a54d004e64433",
                "md5": "bbde0301eec37cfe6213f141500de178",
                "sha256": "57548c1474de96117232bb5638d900b63fb7492ee115e24f1999f934d20a9de2"
            },
            "downloads": -1,
            "filename": "solidwrap-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bbde0301eec37cfe6213f141500de178",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6563,
            "upload_time": "2023-06-24T16:14:17",
            "upload_time_iso_8601": "2023-06-24T16:14:17.812196Z",
            "url": "https://files.pythonhosted.org/packages/1c/da/fcbb39100614b6dbda72f00902e5cf58bc6f8cb9104f893a54d004e64433/solidwrap-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "102bd016557bcb557d5d6e7abcb5e062a371016dfcf37b741adc7ea5af1cec7a",
                "md5": "28d253c034eb90cdd4442b0a829a175c",
                "sha256": "76ba386ae7faaccda5d9267a7cdf5bb1fed43d3e087da6fe64d0be2ca99f8bcb"
            },
            "downloads": -1,
            "filename": "solidwrap-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "28d253c034eb90cdd4442b0a829a175c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8720,
            "upload_time": "2023-06-24T16:14:19",
            "upload_time_iso_8601": "2023-06-24T16:14:19.574424Z",
            "url": "https://files.pythonhosted.org/packages/10/2b/d016557bcb557d5d6e7abcb5e062a371016dfcf37b741adc7ea5af1cec7a/solidwrap-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-24 16:14:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SeanYeatts",
    "github_project": "SolidWrap",
    "github_not_found": true,
    "lcname": "solidwrap"
}
        
Elapsed time: 0.08488s