NextCloud库地址:https://github.com/matejak/nextcloud-API

安装库依赖:



安装库:

建议在虚拟环境下使用

使用示例:

# -*- coding: utf-8 -*-
from nextcloud import NextCloud NEXTCLOUD_URL = 'http://localhost:8080/'
NEXTCLOUD_USERNAME = 'admin'
NEXTCLOUD_PASSWORD = 'admin'
to_js = True
nxc = NextCloud(endpoint=NEXTCLOUD_URL, user=NEXTCLOUD_USERNAME, password=NEXTCLOUD_PASSWORD, json_output=to_js)
# 获取用户的列表
a = nxc.get_users()
print(a.data) # 获取用户的文件夹信息
c = nxc.list_folders('YunOfWx')
# print(c.data) # 上传图片,需要在服务器对应目录下设置文件名
local_filepath = 'test.png'
upload_filepath = 'many/hhh.png'
#
b = nxc.upload_file('YunOfWx', local_filepath, upload_filepath)
print(b.data) # 分享图片拿到公共链接
d = nxc.create_share('many/hhh.png', 3)
print(d.data)

NextCloud + python API的更多相关文章

  1. Appium python API 总结

    Appium python api 根据testerhome的文章,再补充一些文章里面没有提及的API [TOC] [1]find element driver 的方法 注意:这几个方法只能通过sel ...

  2. The novaclient Python API

    The novaclient Python API Usage First create a client instance with your credentials: >>> f ...

  3. Openstack python api 学习文档 api创建虚拟机

    Openstack python api 学习文档 转载请注明http://www.cnblogs.com/juandx/p/4953191.html 因为需要学习使用api接口调用openstack ...

  4. BotVS开发基础—Python API

    代码 import json def main(): # python API列表 https://www.botvs.com/bbs-topic/443 #状态信息 LogStatus(" ...

  5. 《Spark Python API 官方文档中文版》 之 pyspark.sql (一)

    摘要:在Spark开发中,由于需要用Python实现,发现API与Scala的略有不同,而Python API的中文资料相对很少.每次去查英文版API的说明相对比较慢,还是中文版比较容易get到所需, ...

  6. 《Spark Python API 官方文档中文版》 之 pyspark.sql (二)

    摘要:在Spark开发中,由于需要用Python实现,发现API与Scala的略有不同,而Python API的中文资料相对很少.每次去查英文版API的说明相对比较慢,还是中文版比较容易get到所需, ...

  7. HBase Python API

    HBase Python API HBase通过thrift机制可以实现多语言编程,信息通过端口传递,因此Python是个不错的选择 吐槽 博主在Mac上配置HBase,奈何Zoomkeeper一直报 ...

  8. 二、Blender/Python API总览

    原文:https://docs.blender.org/api/blender_python_api_current/info_overview.html Python in Blender  Ble ...

  9. Appium+python自动化8-Appium Python API

    Appium+python自动化8-AppiumPython API   前言: Appium Python API全集,不知道哪个大神整理的,这里贴出来分享给大家. 1.contexts conte ...

随机推荐

  1. 【LeetCode】438. Find All Anagrams in a String 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 滑动窗口 双指针 日期 题目地址:https://l ...

  2. hdu-5568SUM (dp)

    sequence2 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total S ...

  3. ZOJ 1141:Closest Common Ancestors(LCA)

    Closest Common Ancestors Time Limit: 10 Seconds      Memory Limit: 32768 KB Write a program that tak ...

  4. 第二十七个知识点:什么是对称密码加密的AEAD安全定义?

    第二十七个知识点:什么是对称密码加密的AEAD安全定义? AEAD 在之前的博客里,Luke描述了一种被广泛使用的操作模式(ECB,CBC和CTR)对块密码.我们也可能会想我们加密方案的完整性,完整性 ...

  5. HDFS源码解析:教你用HDFS客户端写数据

    摘要:终于开始了这个很感兴趣但是一直觉得困难重重的源码解析工作,也算是一个好的开端. 本文分享自华为云社区<hdfs源码解析之客户端写数据>,作者: dayu_dls. 在我们客户端写数据 ...

  6. Eclipse中英文对照表(整理笔记)

    Eclipse百度界面中英文对照 目录 Eclipse百度界面中英文对照 0.菜单栏 1.File 文件菜单 2.Edit 编辑菜单 3.Source 源代码 4.Refactor 重构 5.Navi ...

  7. Java基础周测题,输入一个整数,输出所有能整除该整数的结果:

    需求说明: 输入一个整数,输出所有能整除该整数的结果: 实现代码: package demo; import java.util.Scanner; public class test1 { publi ...

  8. Kerberos打开debug日志

    在JVM的启动参数中加入如下配置,打开kerberos的debug开关: -Dsun.security.krb5.debug=true JVM启动后,kerberos的相关日志会打印到控制台中, 因为 ...

  9. Windows Batch 编程 和 Powershell 编程

    Batch Script - Functions with Return Values https://www.tutorialspoint.com/batch_script/batch_script ...

  10. 利用static来实现单例模式

    一:之前旧的写法 class Singleton{ private Singleton() {} private static Singleton instance = null; public sy ...