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))


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]



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))


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


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.7.tar.gz (17.5 kB view hashes)

Uploaded Source

Built Distribution

PDFDiagramming-1.0.7-py3-none-any.whl (22.8 kB view hashes)

Uploaded Python 3

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