Movatterモバイル変換


[0]ホーム

URL:


Navigation

Documentation for the Code

A pypi demonstration vehicle.

useful #1 – auto members

This is something I want to say that is not in the docstring.

Platforms:Unix, Windows

classan_example_pypi_project.useful_1.MyPublicClass(foo,bar='baz')

We use this as a public class example class.

You never call this class before callingpublic_fn_with_sphinxy_docstring().

Note

An example of intersphinx is this: youcannot usepickle on this class.

get_foobar(foo,bar=True)

This gets the foobar

This really should have a full function definition, but I am too lazy.

>>>printget_foobar(10,20)30>>>printget_foobar('a','b')ab

Isn’t that what you want?

an_example_pypi_project.useful_1.public_fn_with_googley_docstring(name,state=None)

This function does something.

Args:
name (str): The name to use.
Kwargs:
state (bool): Current state to be in.
Returns:

int. The return code:

0 -- Success!1 -- No good. 2 -- Try again.
Raises:
AttributeError, KeyError

A really great idea. A way you might use me is

>>>printpublic_fn_with_googley_docstring(name='foo',state=None)0

BTW, this always returns 0.NEVER use withMyPublicClass.

an_example_pypi_project.useful_1.public_fn_with_sphinxy_docstring(name,state=None)

This function does something.

Parameters:
  • name (str.) – The name to use.
  • state (bool.) – Current state to be in.
Returns:

int – the return code.

Raises:

AttributeError, KeyError

useful #2 – explicit members

This is something I want to say that is not in the docstring.

A very useful module indeed.

an_example_pypi_project.useful_2.public_fn_with_sphinxy_docstring(name,state=None)

This function does something.

Parameters:
  • name (str.) – The name to use.
  • state (bool.) – Current state to be in.
Returns:

int – the return code.

Raises:

AttributeError, KeyError

an_example_pypi_project.useful_2._private_fn_with_docstring(foo,bar='baz',foobarbas=None)
I have a docstring, but won’t be imported if you just use:members:.
classan_example_pypi_project.useful_2.MyPublicClass(foo,bar='baz')

We use this as a public class example class.

You never call this class before callingpublic_fn_with_sphinxy_docstring().

Note

An example of intersphinx is this: youcannot usepickle on this class.

get_foobar(foo,bar=True)

This gets the foobar

This really should have a full function definition, but I am too lazy.

>>>printget_foobar(10,20)30>>>printget_foobar('a','b')ab

Isn’t that what you want?

_get_baz(baz=None)

A private function to get baz.

This really should have a full function definition, but I am too lazy.

Table Of Contents

Previous topic

Getting Started Withsetuptools andsetup.py

Next topic

Building and Uploading Your Sphinx Docs to pypi

This Page

Quick search

Enter search terms or a module, class or function name.

Navigation

© Copyright 2009, Andrew Carter. Created usingSphinx 0.6.3.

[8]ページ先頭

©2009-2025 Movatter.jp