Skip to main content

BrickFTP
=======

|PyPI| |Python Versions| |Build Status|

Python Client for BrickFTP API (https://developers.brickftp.com/).
This client does not implement all the features of the API, pull requests are very welcome to expand functionality.

Installation
------------

To install brickftp, simply:

.. code:: bash

pip install brickftp

How To Use
----------

Initialise the client
~~~~~~~~~~~~~~~~~~~~~

.. code:: python

from brickftp import BrickFTP
client = BrickFTP(
username='bob@example.com',
password='password123',
subdomain='subdomain',
)

Available methods
~~~~~~~~~~~~~~~~~

NOTE: For each client method, if there is a negative response from the API then ``BrickFTPError`` will raise.

List the contents of a folder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

client.dir('/some_remote/path')

Upload a file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Upto 5MB supported by the client at this time.

.. code:: python

client.upload(upload_path='/some/path.txt', local_path='path.txt')

Download a file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

client.download_file(remote_path='/some/path.txt', local_path='path.txt')

Delete a file or folder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

NOTE: Deletes recursively through subdirectories.

.. code:: python

client.delete('/some_remote/path')

Create a folder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

client.mkdir('/some_remote/path')

Requirements
------------

::

1. Python 3.6+
2. See requirements.txt

Running the tests
-----------------

Set the environment variables: ``BRICK_FTP_USER``, ``BRICK_FTP_PASS``, ``BRICK_FTP_SUBDOMAIN``.

NOTE: Running the tests against a BrickFTP user will wipe all data on their account.

.. code:: bash

pip install -r requirements-test.txt
pytest

.. |PyPI| image:: https://img.shields.io/pypi/v/BrickFTP.svg
:target: https://pypi.python.org/pypi/BrickFTP
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/BrickFTP.svg
:target: https://pypi.python.org/pypi/BrickFTP
.. |Build Status| image:: https://travis-ci.org/Usio-Energy/BrickFTP.png?branch=master
:target: https://travis-ci.org/Usio-Energy/BrickFTP


Metadata

Release files for BrickFTP 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BrickFTP 0.5.1
File Size Uploaded
BrickFTP-0.5.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BrickFTP 0.5.1
File Interpreter ABI Platform
BrickFTP-0.5.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 11.0 kB

Release files / BrickFTP-0.5.1.tar.gz

Download URL BrickFTP-0.5.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6b0232aff0ee9f43b9a6aaf5282021cf1961358f5414cdbe7e8abec462aac2c2
BLAKE2b-256 checksum
How to use checksums
0d05ae509c84570b3fd30fa3d0ad4f042b35617c1e0b00d38c79b7513c62f7f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / BrickFTP-0.5.1-py2.py3-none-any.whl

Download URL BrickFTP-0.5.1-py2.py3-none-any.whl
Size 3.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
130af6a405818dd33e59690eaa23852ca40efbda39fce0cc84e2913f783c4779
BLAKE2b-256 checksum
How to use checksums
67a734d092d82626ef7db8c0b74460416b42c8243ad4881d4dbd442f1cc32660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page