@@ -4,23 +4,23 @@ Creating an extension
44=====================
55
66Once a filesystem has been implemented, it can be integrated with other
7- projects and applications using PyFilesystem.
7+ applications and projects using PyFilesystem.
88
99
1010Naming Convention
1111-----------------
1212
1313For visibility in PyPi, we recommend that your package be prefixed with
14- ``fs- ``, for example your package may be named `fs-awesome ` or `fs-
15- awesomefs `.
14+ ``fs- ``. For instance if you have implemented an ``AwesomeFS ``
15+ PyFilesystem class, your packaged could be be named ``fs-awesome `` or
16+ ``fs-awesomefs ``.
1617
1718
1819Opener
1920------
2021
21- In order for your filesystem to be opened through :doc: `openers ` like
22- the other builtin filesystems, you should define a
23- :class: `~fs.opener.base.Opener ` class for your filesystem.
22+ In order for your filesystem to be opened with an :ref: `FS URL <fs-urls >`
23+ you should define an :class: `~fs.opener.base.Opener ` class.
2424
2525Here's an example taken from an Amazon S3 Filesystem::
2626
@@ -51,26 +51,25 @@ Here's an example taken from an Amazon S3 Filesystem::
5151 )
5252 return s3fs
5353
54- My convention this would be declared in ``opener.py ``.
54+ By convention this would be defined in ``opener.py ``.
5555
5656
5757To register the opener you will need to define an `entry point
5858<http://setuptools.readthedocs.io/en/latest/setuptools.html?highlight=entry%20points#dynamic-discovery-of-services-and-plugins> `_
5959in your setup.py. See below for an example.
6060
6161
62- The `` setup.py `` file
63- ---------------------
62+ The setup.py file
63+ -----------------
6464
6565Refer to the `setuptools documentation <https://setuptools.readthedocs.io/ >`_
6666to see how to write a ``setup.py `` file. There are only a few things that
6767should be kept in mind when creating a Pyfilesystem2 extension. Make sure that:
6868
69- * ``fs `` is in the ``install_requires `` list, in order to always have
70- Pyfilesystem2 installed before your extension. You should reference
71- the version number with the ``~= `` operator which ensures that the
72- install will get any bugfix releases of PyFilesystem but not any
73- potentially breaking changes.
69+ * ``fs `` is in the ``install_requires `` list. You should reference the
70+ version number with the ``~= `` operator which ensures that the install
71+ will get any bugfix releases of PyFilesystem but not any potentially
72+ breaking changes.
7473* Ìf you created an opener, include it as an ``fs.opener `` entry point,
7574 using the name of the entry point as the protocol to be used.
7675
@@ -100,27 +99,23 @@ Here is an minimal ``setup.py`` for our project:
10099 Good Practices
101100--------------
102101
103- * Keep track of your achievements ! Add ``__version__ ``, ``__author__ ``,
104- ``__author_email__ `` and ``__license__ `` variables to your project
105- (either in ``fs/awesomefs.py `` or ``fs/awesomefs/__init__.py `` depending
106- on the chosen structure), containing:
107-
108- ``__version__ ``
109- the version of the extension (use `Semantic Versioning
110- <http://semver.org/> `_ if possible !)
102+ Keep track of your achievements! Add the following values to your ``__init__.py ``:
111103
112- ``__author__ ``
113- your name(s)
104+ * ``__version__ `` The version of the extension (we recommend following
105+ `Semantic Versioning <http://semver.org/ >`_),
106+ * ``__author__ `` Your name(s).
107+ * ``__author_email__ `` Your email(s).
108+ * ``__license__ `` The module's license.
114109
115- `` __author_email__ ``
116- your email(s)
110+ Let us Know
111+ -----------
117112
118- ``__license__ ``
119- the license of the subpackage
113+ Contact us to add your filesystem to the `PyFilesystem Wiki <https://www.pyfilesystem.org/page/index-of-filesystems/ >`_.
120114
121115
122116Live Example
123117------------
124118
125119See `fs.sshfs <https://github.com/althonos/fs.sshfs >`_ for a functioning
126- PyFilesystem2 extension implementing a Pyfilesystem2 filesystem over SSH.
120+ PyFilesystem2 extension implementing a Pyfilesystem2 filesystem over
121+ SSH.
0 commit comments