Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Requests-FTP is an implementation of a very stupid FTP transport adapter for
use with the awesome Requests
_ Python library.
This library is not intended to be an example of Transport Adapters best practices. This library was cowboyed together in about 4 hours of total work, has no tests, and relies on a few ugly hacks. Instead, it is intended as both a starting point for future development and a useful example for how to implement transport adapters.
Here's how you use it:
.. code-block:: pycon
>>> import requests
>>> import requests_ftp
>>> requests_ftp.monkeypatch_session()
>>> s = requests.Session()
>>> resp = s.list('ftp://127.0.0.1/', auth=('Lukasa', 'notmypass'))
>>> resp.status_code
'226'
>>> print resp.content
...snip...
>>> resp = s.stor('ftp://127.0.0.1/test.txt', auth=('Lukasa', 'notmypass'),
files={'file': open('report.txt', 'rb')})
Almost none!
Session.get()
and Session.post()
methods.Does not provide:
Many corners have been cut in my rush to get this code finished. The most obvious problem is that this code does not have any tests. This is my highest priority for fixing.
More notably, we have the following important caveats:
Please do! I would love for this to be developed further by anyone who is interested. Wherever possible, please provide unit tests for your work (yes, this is very much a 'do as I say, not as I do' kind of moment). Don't forget to add your name to AUTHORS.
To maximise compatibility with Requests, this code is licensed under the Apache license. See LICENSE for more details.
.. _Requests
: https://github.com/kennethreitz/requests
FAQs
FTP Transport Adapter for Requests.
We found that requests-ftp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.