Skip to main content

Draw UML diagrams in PDF format

Project description

The documentation is here.

Sample Snippets

Create a basic class

diagram: Diagram = Diagram(fileName='basicClass.pdf', dpi=75)
classDef: ClassDefinition = ClassDefinition(name='BasicClass', size=Size(width=100, height=100))

diagram.drawClass(classDef)
diagram.write()

Create a class with a method

diagram: Diagram = Diagram(fileName=f'Test-BasicMethod.pdf', dpi=75)

position: Position = Position(107, 30)
size:     Size     = Size(width=266, height=100)

car: ClassDefinition = ClassDefinition(name='Car', position=position, size=size)

initMethodDef: MethodDefinition = MethodDefinition(name='__init__', visibility=DefinitionType.Public)

initParam: ParameterDefinition = ParameterDefinition(name='make', parameterType='str', defaultValue='')
initMethodDef.parameters = [initParam]
car.methods = [initMethodDef]

diagram.drawClass(car)

diagram.write()

Create inheritance diagram

diagram: Diagram = Diagram(fileName='MinimalInheritance.pdf', dpi=75)

cat:  ClassDefinition = ClassDefinition(name='Gato', position=Position(536, 19), size=Size(height=74, width=113))
opie: ClassDefinition = ClassDefinition(name='Opie', position=Position(495, 208), size=Size(width=216, height=87))

diagram.drawClass(classDefinition=cat)
diagram.drawClass(classDefinition=opie)

opieToCat: UmlLineDefinition = UmlLineDefinition(lineType=LineType.Inheritance, source=Position(600, 208), destination=Position(600, 93))

diagram.drawUmlLine(lineDefinition=opieToCat)
diagram.write()

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

PDFDiagramming-1.0.8.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

PDFDiagramming-1.0.8-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file PDFDiagramming-1.0.8.tar.gz.

File metadata

  • Download URL: PDFDiagramming-1.0.8.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for PDFDiagramming-1.0.8.tar.gz
Algorithm Hash digest
SHA256 b71dbffe6eba0f8d8944fc8b52e7084bd34610f7873700f4be3be4eda9b5616e
MD5 ed5685084f90aa7729623ef5c2f24575
BLAKE2b-256 19dadc9ec2be7cdfd61a358ea2b80e3f84afb466823a745d99fe44a566de7f5a

See more details on using hashes here.

File details

Details for the file PDFDiagramming-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: PDFDiagramming-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for PDFDiagramming-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0b423b13fef2df4e8f19df70dcd2529171eecb4baf10671c0a03d7643f05ea8a
MD5 18697380697b6f28ea0353346043ff42
BLAKE2b-256 fe3334d90561795f5ae90a7924f09822e2590beacf9c37742c2fe936f016308e

See more details on using hashes here.

Supported by

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