naveen521kk / sxcu Goto Github PK
View Code? Open in Web Editor NEWPython API wrapper for sxcu.net
Home Page: https://sxcu.readthedocs.io
License: Apache License 2.0
Python API wrapper for sxcu.net
Home Page: https://sxcu.readthedocs.io
License: Apache License 2.0
Currently, the error response leads to JSON decode error. It should not happen and it must be handled by reading status code and custom errors must be raised.
Add rate-limit header to get how long should we wait until the rate-limit expires.
I took this Rate-Limit header example screenshot below in sxcu Rate-Limit Overview website.
Currently, there is no way to edit collections. Ref https://sxcu.net/api/docs/endpoint/edit_collection
Implement an API for that.
Currently, the image file specified is just uploaded no matter what is it. Add a check for it and raise a Value error when it is invalid.
Logging is necessary and can be done easily using the default logging module. This would help to debug errors. A new class for logging would do.
Hey bro Can you pls share some more examples like this (I Don't know much about python😅(
import sxcu
connector = sxcu.SXCU()
result = connector.upload_image("foo.png")
print(result["url"])
For subdomain
And If you are on Telegram can you pls share you id
as can be seen here (and some other places)
with open(file, "rb") as img_file:
files = {"file": img_file}
res = request_handler.post(url, files=files, data=data)
The wrapper accepts file paths over the file's content itself and then handles reading from that path. This is a problem when a user gets an image dynamically from some algorithm because then they have to write to the disk and supply that file path (not only slow but can cause errors based on permissions and os differences).
possible solutions include:
file_or_path
which is handled differently based on its data type (bytes == file content, string == file path)I'd be willing to make a PR if you know which solution you'd like to choose. In my opinion, now is a good time to change something like this because the API is already changing a lot due to v1 being deprecated. Let me know what you think :)
The title says it. A simple CLI interface would rather help a lot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.