rfechtner / webflowpy Goto Github PK
View Code? Open in Web Editor NEWGeneric framework to load data into Webflow CMS via API
License: MIT License
Generic framework to load data into Webflow CMS via API
License: MIT License
I have tried with a list of domains!
I just wanted to say that I really like your Webflow package and it's really easy to use.
I'm just wondering what the item_data file type is supposed to be in create_item().
How is the item_data supposed to look like?
I get a "ValidationError: Invalid request body" when I try to use JSON data.
Hi there,
Great library. I just wanted to check how the code handles a 429 - Too Many Requests.
My expectation is that if a 429 is retrieved, the library should wait and then automatically try the same request again. What I see is that when a 429 is received, the error is logged but not retried and it moves on to the next record. This results in content items not being loaded.
Here is the log:
21:19:40 [ERR ] POST /collections/64de29c434c1092b42a610a4/items?live=true: [429] - Too Many Requests
21:19:40 [INFO] Response: {
"msg": "Rate limit hit",
"code": 429,
"name": "RateLimit",
"path": "/collections/64de29c434c1092b42a610a4/items",
"err": "RateLimit: Rate limit hit"
}
21:19:41 [ERR ] POST /collections/64de29c434c1092b42a610a4/items?live=true: [429] - Too Many Requests
21:19:41 [INFO] Response: {
"msg": "Rate limit hit",
"code": 429,
"name": "RateLimit",
"path": "/collections/64de29c434c1092b42a610a4/items",
"err": "RateLimit: Rate limit hit"
}
21:19:41 [ERR ] POST /collections/64de29c434c1092b42a610a4/items?live=true: [429] - Too Many Requests
21:19:41 [INFO] Response: {
"msg": "Rate limit hit",
"code": 429,
"name": "RateLimit",
"path": "/collections/64de29c434c1092b42a610a4/items",
"err": "RateLimit: Rate limit hit"
}
21:19:42 [ERR ] POST /collections/64de29c434c1092b42a610a4/items?live=true: [429] - Too Many Requests
21:19:42 [INFO] Response: {
"msg": "Rate limit hit",
"code": 429,
"name": "RateLimit",
"path": "/collections/64de29c434c1092b42a610a4/items",
"err": "RateLimit: Rate limit hit"
}
Could you confirm if the library should retry the request? If so, is there anything I need to do/configure?
Hi,
I found the default logging level too verbose and would like to set it to show warnings or errors only. I tried doing logging.getLogger("webflowpy").setLevel(logging.WARNING)
in my code, but didn't work and still produces the same output as before.
I also tried logging.getLogger("webflowpy").handlers[-1].setLevel(logging.WARNING)
, same result.
In https://github.com/rfechtner/webflowpy/blob/master/webflowpy/log.py#L14 the logger name is set as 'webflowpy', so I'm not sure what I'm doing wrong. Some help here would be super appreciated :D
Thanks!
I noticed that even when there are errors, no exceptions are risen, and that makes it harder to use the library effectively.
Would you accept a PR to raise exceptions when the response doesn't have an OK status code and the code in these lines on WebflowResponse is reached?
Great work with the library overall, I'm finding it very useful! :)
I noticed that you don't use typing and I find it really useful.
Would you accept a PR which will add types to your code?
Great work with the library overall, I'm finding it very useful! :)
It's listed in requirements.txt, but a grep did not find it in the code.
Hi, in the file https://github.com/rfechtner/webflowpy/blob/master/webflowpy/Webflow.py in the __query method, on line 43 there is print("test"). It would be nice if you remove this
Update Collection Item should PUT according to the API reference.
currently:
return self.__query('POST', '/collections/{collection_id}/items/{item_id}{live}'.format(
should be:
return self.__query('PUT', '/collections/{collection_id}/items/{item_id}{live}'.format(
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.