<jupyter_start><jupyter_text>ComponentsWe store our component functions inside the `pp.components` module. Eachfunction there returns a Component objectYou can use `dir` or `help` over the `pp.c` module to see the all availablecomponents.Some of which are just shapes, but we call them components as they all inheritfrom the component class in `pp.Component`<jupyter_code>import pp
c = pp.c.mzi()
pp.qp(c)
c.ports
c = pp.c.ring_single_bus()
pp.qp(c)<jupyter_output><empty_output><jupyter_text>You can see all the components available in `gdsfactory` by typing `help(pp.c)`  What is a factory?A factory is a dict of functions  What factories does gdsfactory have?There are two main factories:    - component_factory- route_factoryA factory is just a function that returns obects.  Why using factories?Because functions are easier to write than classes.In gdsfactory you will never have to write any classes. The only classes are for internal use (Port, Component and ComponentReference) and have already been defined for you<jupyter_code>import pp
component_factory = pp.component_factory
component_factory.keys()
route_factory = pp.routing.route_factory
route_factory.keys()
route_optical = route_factory['optical']
route_optical?<jupyter_output><empty_output><jupyter_text>What can you do with a factory?A factory easily allows you to access and customize the functions from that `dict`. For example, lets say that you work with fab A. You can define a PDK factory of components and some custom routing waveguides for that particular technology.<jupyter_code>component_function = component_factory['bend_circular180']
component = component_function()
pp.qp(component)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06654888103651355, 'fraction_numerical': 0.0017667844522968198, 'mean_word_length': 6.260683760683761, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '274880', 'license': 'MIT', 'n_tokens_mistral': 476, 'n_tokens_neox': 464, 'n_words': 193, 'path': 'notebooks/02_components.ipynb', 'repo_name': 'flaport/gdsfactory', 'size': '1698'}