MCPcopy Create free account

hub / github.com/scanny/python-pptx / functions

Functions5,025 in github.com/scanny/python-pptx

↓ 497 callersFunctionelement
Return an oxml element parsed from the XML generated from `cxel_str`.
tests/unitutil/cxml.py:38
↓ 434 callersFunctioninstance_mock
Return mock for instance of `cls` that draws its spec from that class. The mock does not allow new attributes to be set on the instance. If `name
tests/unitutil/mock.py:72
↓ 202 callersFunctionregister_element_cls
Register `cls` to be constructed when oxml parser encounters element having `nsptag_name`. `nsptag_name` is a string of the form `nspfx:tagroot`,
src/pptx/oxml/__init__.py:39
↓ 183 callersFunctionPresentation
Return a |Presentation| object loaded from *pptx*, where *pptx* can be either a path to a ``.pptx`` file (a string) or a file-like object. If
src/pptx/api.py:21
↓ 168 callersFunctiontest_pptx
Return the absolute path to test .pptx file with root name *name*.
features/steps/helpers.py:49
↓ 161 callersFunctionclass_mock
Return a mock patching the class with qualified name *q_class_name*. The mock is autospec'ed based on the patched class unless the optional argum
tests/unitutil/mock.py:23
↓ 148 callersFunctionxml
Return the XML generated from `cxel_str`.
tests/unitutil/cxml.py:44
↓ 124 callersMethodwith_child
Cause new child element specified by *child_bldr* to be appended to the children of this element.
tests/unitdata.py:48
↓ 117 callersFunctionmethod_mock
Return mock for method `method_name` on `cls`. The patch is reversed after pytest uses it.
tests/unitutil/mock.py:99
↓ 107 callersFunctionproperty_mock
Return a mock for property `prop_name` on class `cls`.
tests/unitutil/mock.py:119
↓ 100 callersMethodwith_nsdecls
Cause the element to contain namespace declarations. By default, the namespace prefixes defined in the Builder class are used. These
tests/unitdata.py:56
↓ 83 callersMethodxpath
(self, xpath)
lab/parse_xsd/parse_xsd.py:62
↓ 70 callersFunctionqn
Return a Clark-notation qualified tag name corresponding to `namespace_prefixed_tag`. `namespace_prefixed_tag` is a string like 'p:body'. 'qn' st
src/pptx/oxml/ns.py:120
↓ 69 callersFunctionparse_xml
Return root lxml element obtained by parsing XML character string in `xml`.
src/pptx/oxml/__init__.py:34
↓ 66 callersMethodappend
(self, series)
src/pptx/chart/data.py:39
↓ 56 callersMethodget
Return the slide identified by int `slide_id` in this presentation. Returns `default` if not found.
src/pptx/slide.py:275
↓ 54 callersFunctionnsdecls
(*prefixes: str)
src/pptx/oxml/ns.py:105
↓ 49 callersMethodxpath
Override of `lxml` _Element.xpath() method. Provides standard Open XML namespace mapping (`nsmap`) in centralized location.
src/pptx/oxml/xmlchemy.py:708
↓ 42 callersMethodformat
The |ChartFormat| object providing access to the shape formatting properties of this data point, such as line and fill.
src/pptx/chart/point.py:75
↓ 35 callersMethodsplit
Remove merge from this (merge-origin) cell. The merged cell represented by this object will be "unmerged", yielding a separate unmerg
src/pptx/table.py:312
↓ 33 callersMethodread
Return *length* bytes from this stream starting at *offset*.
src/pptx/text/fonts.py:209
↓ 31 callersMethodxml
The XML corresponding to the tree rooted at this element, pretty-printed using 2-spaces indentation at each level and with a
tests/unitutil/cxml.py:161
↓ 29 callersMethodnew
Return a new `<Types>` element.
src/pptx/opc/oxml.py:178
↓ 24 callersFunctioninitializer_mock
Return mock for __init__() method on `cls`. The patch is reversed after pytest uses it.
tests/unitutil/mock.py:62
↓ 23 callersFunctiona_parent
()
tests/oxml/test_xmlchemy.py:587
↓ 22 callersFunctionfunction_mock
Return mock patching function with qualified name `q_function_name`. Patch is reversed after calling test returns.
tests/unitutil/mock.py:50
↓ 22 callersMethodwrite
Write a physical package (.pptx file) to `pkg_file`. The serialized package contains `pkg_rels` and `parts`, a content-types stream based on
src/pptx/opc/serialized.py:71
↓ 20 callersMethodadd_data_point
Return an XyDataPoint object newly created with values *x* and *y*, and appended to this sequence.
src/pptx/chart/data.py:755
↓ 19 callersMethodget
The first placeholder shape with matching `idx` value, or `default` if not found.
src/pptx/shapes/shapetree.py:723
↓ 19 callersMethodrelate_to
Return rId key of relationship of `reltype` to `target`. If such a relationship already exists, its rId is returned. Otherwise the relationsh
src/pptx/opc/package.py:41
↓ 19 callersMethodremove
Remove `slide_layout` from the collection. Raises ValueError when `slide_layout` is in use; a slide layout which is the basis for one
src/pptx/slide.py:390
↓ 17 callersMethod_shape_factory
Return an instance of the appropriate shape proxy class for `shape_elm`.
src/pptx/shapes/shapetree.py:221
↓ 17 callersMethodfind
Return the absolute path to an installed OpenType font. File is matched by `family_name` and the styles `is_bold` and `is_italic`.
src/pptx/text/fonts.py:18
↓ 17 callersMethodvalidate_int_in_range
(cls, value, min_inclusive, max_inclusive)
src/pptx/oxml/simpletypes.py:51
↓ 16 callersMethodindex
Map `slide` to its zero-based position in this slide sequence. Raises |ValueError| on *slide* not present.
src/pptx/slide.py:285
↓ 14 callersFunction_get_child_or_append
(element, tag)
lab/cust-elm-classes/main.py:48
↓ 14 callersMethodadd_series
Return an |XySeriesData| object newly created and added at the end of this sequence, identified by *name* and values formatted with
src/pptx/chart/data.py:691
↓ 14 callersFunctionan_sp
()
tests/oxml/unitdata/shape.py:206
↓ 14 callersMethodfrom_colorchoice_parent
(cls, eg_colorChoice_parent)
src/pptx/dml/color.py:42
↓ 13 callersFunctiona_solidFill
()
tests/oxml/unitdata/dml.py:81
↓ 13 callersFunctionsnippet_text
Return the unicode text read from the test snippet file having *snippet_file_name*.
tests/unitutil/file.py:35
↓ 12 callersMethodcell
Return cell at `row_idx`, `col_idx`. Return value is an instance of |_Cell|. `row_idx` and `col_idx` are zero-based, e.g. cell(0, 0)
src/pptx/table.py:34
↓ 12 callersMethodrelated_part
Return related |Part| subtype identified by `rId`.
src/pptx/opc/package.py:53
↓ 11 callersMethod_set_element_text
Set string value of `name` property to `value`.
src/pptx/oxml/coreprops.py:273
↓ 11 callersMethod_text_of_element
(self, property_name: str)
src/pptx/oxml/coreprops.py:282
↓ 11 callersFunctiona_prstGeom
()
tests/oxml/unitdata/shape.py:174
↓ 11 callersMethodadd_sub_category
Return a newly created |data.Category| object having *label* and appended to the end of the sub-category sequence for this category.
src/pptx/chart/data.py:522
↓ 11 callersMethodload
Return `cls` instance loaded from arguments. This one is a straight pass-through, but subtypes may do some pre-processing, see XmlPart
src/pptx/opc/package.py:299
↓ 10 callersFunction_child
Return direct child of *element* having *child_tagname* or :class:`None` if no such child element is present.
lab/cust-elm-classes/main.py:31
↓ 10 callersFunctiona_ph
()
tests/oxml/unitdata/shape.py:166
↓ 10 callersFunctionabsjoin
(*paths: str)
tests/unitutil/file.py:10
↓ 10 callersMethodadd_series
Add a series to this data set entitled *name* and having the data points specified by *values*, an iterable of numeric values.
src/pptx/chart/data.py:282
↓ 10 callersFunctionan_oomChild
()
tests/oxml/test_xmlchemy.py:599
↓ 10 callersFunctionan_spPr
()
tests/oxml/unitdata/shape.py:210
↓ 10 callersMethodfrom_fill_parent
Return a |FillFormat| instance initialized to the settings contained in *eg_fillProperties_parent*, which must be an element having
src/pptx/dml/fill.py:39
↓ 10 callersMethodinsert_element_before
(self, elm: ElementBase, *tagnames: str)
src/pptx/oxml/xmlchemy.py:685
↓ 9 callersFunctiona_schemeClr
()
tests/oxml/unitdata/dml.py:77
↓ 9 callersMethodadd_category
Return a newly created |data.Category| object having *label* and appended to the end of this category sequence. *label* can be
src/pptx/chart/data.py:365
↓ 9 callersFunctionan_oooChild
()
tests/oxml/test_xmlchemy.py:603
↓ 9 callersMethodfactory
Return |_PhysPkgReader| subtype instance appropriage for `pkg_file`.
src/pptx/opc/serialized.py:130
↓ 9 callersMethodfrom_xml
Enumeration member corresponding to XML attribute value `xml_value`. Raises `ValueError` if `xml_value` is the empty string ("") or is not an
src/pptx/enum/base.py:54
↓ 9 callersMethodpart_related_by
Return (single) part having relationship to this package of `reltype`. Raises |KeyError| if no such relationship is found and |ValueError| if
src/pptx/opc/package.py:33
↓ 9 callersFunctionsnippet_seq
Return a tuple containing the unicode text snippets read from the snippet file having *name*. Snippets are delimited by a blank line. If spec
tests/unitutil/file.py:21
↓ 9 callersMethodtc
Return `a:tc` element at `row_idx`, `col_idx`.
src/pptx/oxml/table.py:135
↓ 9 callersFunctiontest_file
Return the absolute path to the file having *filename* in acceptance test_files directory.
features/steps/helpers.py:39
↓ 8 callersFunctionBaseShapeFactory
Return an instance of the appropriate shape proxy class for `shape_elm`.
src/pptx/shapes/shapetree.py:803
↓ 8 callersMethod_add_to_class
Add `method` to the target class as `name`, unless `name` is already defined there.
src/pptx/oxml/xmlchemy.py:358
↓ 8 callersFunction_required_child
Add child element with *tag* to *parent* if it doesn't already exist.
lab/cust-elm-classes/main.py:92
↓ 8 callersFunctiona_zomChild
()
tests/oxml/test_xmlchemy.py:591
↓ 8 callersFunctionan_nvSpPr
()
tests/oxml/unitdata/shape.py:198
↓ 8 callersFunctionan_xfrm
()
tests/oxml/unitdata/shape.py:214
↓ 8 callersMethodclose
Close the wrapped file. Using the stream after closing raises an exception.
src/pptx/text/fonts.py:202
↓ 8 callersMethodconvert_from_xml
(cls, str_value: str)
src/pptx/oxml/simpletypes.py:231
↓ 8 callersMethodopen
Return a |_Font| instance loaded from *font_file_path*.
src/pptx/text/fonts.py:134
↓ 7 callersFunctiona_lumMod
()
tests/oxml/unitdata/dml.py:65
↓ 7 callersFunctiona_zooChild
()
tests/oxml/test_xmlchemy.py:595
↓ 7 callersFunctionabsjoin
(*paths: str)
features/steps/helpers.py:6
↓ 7 callersMethodadd_chart
Add a new chart of `chart_type` to the slide. The chart is positioned at (`x`, `y`), has size (`cx`, `cy`), and depicts `chart_data`.
src/pptx/shapes/shapetree.py:236
↓ 7 callersMethodadd_series
Return a |BubbleSeriesData| object newly created and added at the end of this sequence, and having series named *name* and values for
src/pptx/chart/data.py:717
↓ 7 callersMethodcoreProperties_xml
(self, tagname: str | None, str_val: str | None, attrs: str = "")
tests/parts/test_coreprops.py:157
↓ 7 callersFunctionnew
(tag, **extra)
lab/parse_xsd/objectify_lab.py:47
↓ 7 callersMethodparent_bldr
(self, zooChild_is_present)
tests/oxml/test_xmlchemy.py:439
↓ 7 callersMethodpopulate_class_members
Add the appropriate methods to `element_cls`.
src/pptx/oxml/xmlchemy.py:422
↓ 7 callersMethodvalidate
(cls, value)
src/pptx/oxml/simpletypes.py:169
↓ 6 callersMethod__init__
(self, tr: CT_TableRow, parent: _RowCollection)
src/pptx/table.py:403
↓ 6 callersMethod__init__
(self, label, parent)
src/pptx/chart/data.py:516
↓ 6 callersMethod__new__
(cls, cm: float)
src/pptx/util.py:77
↓ 6 callersMethod_get_boolean_property
Generalized getter for the boolean properties on the `a:tblPr` child element. Defaults to False if `propname` attribute is missing or `a:tblP
src/pptx/oxml/table.py:139
↓ 6 callersMethod_get_xfrm_attr
(self, name: str)
src/pptx/oxml/shapes/shared.py:209
↓ 6 callersMethod_recalculate_extents
Adjust position and size to incorporate all contained shapes. This would typically be called when a contained shape is added, removed, or its
src/pptx/shapes/shapetree.py:511
↓ 6 callersMethod_set_boolean_property
Generalized setter for boolean properties on the `a:tblPr` child element. Sets `propname` attribute appropriately based on `value`. If `value
src/pptx/oxml/table.py:151
↓ 6 callersMethod_set_xfrm_attr
(self, name, value)
src/pptx/oxml/shapes/shared.py:215
↓ 6 callersFunctiona_gd
()
tests/oxml/unitdata/shape.py:146
↓ 6 callersFunctiona_lumOff
()
tests/oxml/unitdata/dml.py:69
↓ 6 callersFunctionan_nvPr
()
tests/oxml/unitdata/shape.py:194
↓ 6 callersMethodbuild_freeform
Return |FreeformBuilder| object to specify a freeform shape. The optional `start_x` and `start_y` arguments specify the starting pen position
src/pptx/shapes/shapetree.py:398
↓ 6 callersMethoddrop_rel
Remove relationship identified by `rId` if its reference count is under 2. Relationships with a reference count of 0 are implicit relationshi
src/pptx/opc/package.py:409
↓ 6 callersMethoditer_parts
Generate exactly one reference to each part in the package.
src/pptx/opc/package.py:88
↓ 6 callersFunctionmake_category_chart_data
Return a |CategoryChartData| instance populated with *cat_count* categories of type *cat_type* and *ser_count* series. Values are auto-ge
tests/chart/test_xmlwriter.py:683
↓ 6 callersMethodnext_partname
Return |PackURI| next available partname matching `tmpl`. `tmpl` is a printf (%)-style template string containing a single replacement item,
src/pptx/opc/package.py:133
next →1–100 of 5,025, ranked by callers