Skip to main content

vsdx - A python library for processing .vsdx files

Project description

vsdx - A python library for processing Visio .vsdx files

Note: this is an early release with limited functionality

example code to find a shape with specific text, remove it, and then save the updated .vsdx file:

from vsdx import VisioFile

filename = 'my_file.vsdx'
# open a visio file
with VisioFile(filename) as vis:
    # get page shapes collection
    shapes = vis.page_objects[0].shapes
    # get shape to remove by its text value
    s = shapes[0].find_shape_by_text('Shape to remove')  # type: VisioFile.Shape
    # remove the shape if found
    if s:
        s.remove()
        # save a new copy
        vis.save_vsdx('shape_removed.vsdx')

Please refer to tests/test.py for more usage examples in the form of pytest tests.


Change Log

  • 0.2.2: Added x & y location setters to Shape, and move(x_delta, y_delta) method - both with related tests
  • 0.2.3: Updated tests to output files to an /out folder. Added test vsdx file with compound shape. Updated Shape text getter/setter
  • 0.2.4: Added find_replace(old, new) method to Shape and Page classes to recursively replace old with new
  • 0.2.5: Add new Shape properties connected_shapes (list of Shape objects) and connects (list of Connect objects) properties to allow related shapes to be identified (i.e. shapes and connectors) and provide information on the relationship, in new Connect object. Also new properties of shape begin_x/y, end_x/y, plus height/width setters

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsdx-0.2.5.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vsdx-0.2.5-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file vsdx-0.2.5.tar.gz.

File metadata

  • Download URL: vsdx-0.2.5.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for vsdx-0.2.5.tar.gz
Algorithm Hash digest
SHA256 8f1b31ef52a21fae9b88c2be1cb7321df5eed617765827efc74d0432c5a5554c
MD5 7da74a9994b07293783a6a8e14b53c4c
BLAKE2b-256 5e58d4695c6e4d90a4142d3c5cdd6b615af700832d8f8f8e98d881f8301d0f5b

See more details on using hashes here.

File details

Details for the file vsdx-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: vsdx-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for vsdx-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bf2d4940fb6512de33dd462411de60292c5024f2aaa76166e56857d49b7c229c
MD5 f834cd91324158c46c3d5b0ce7cbe52f
BLAKE2b-256 3f5b6ee2fdd9cbf95666435ed96c011b36f3e4b1a1b88c126f794ced4f529bfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page