Comments (5)
Hi @kfleitman06, thanks for reporting the issue.
I will take a look at it and get back to you if I have any questions.
from contentful.py.
Hi @kfleitman06, can you please share the code snippets to produce the results mentioned above?
Thanks
from contentful.py.
hi @rubydog, thanks for taking a look
I'm able to produce these results with the following code
import ujson
import contentful
SPACE_ID = "<REDACTED>"
ACCESS_TOKEN = "<REDACTED>"
def main():
client = contentful.Client(
space_id=SPACE_ID,
access_token=ACCESS_TOKEN,
content_type_cache=True,
reuse_entries=True,
)
entries = client.entries(
{
"content_type": "<REDACTED>",
"fields.pageType": "features",
"fields.slug": "<REDACTED>",
"include": 10,
}
)
if not entries:
raise Exception
entry = entries[0]
fields = entry.fields()
print(ujson.dumps(fields)) # this value is returned as a FastAPI response, rather than used further within this codebase
if __name__ == '__main__':
main()
Within fields
, we have fields defined such as content
(a list of entries) and hero
(a single referenced entry, containing fields that also have referenced entries) . The nested referenced entries mentioned prior to doing ujson.dumps()
show the full resolved value under _fields
, however _fields
is then lost on each after ujson.dumps()
, resulting in only having the link/entry ID available for any information, under raw
We currently have a support ticket open with Contentful, if you are able to access that. I can provide the redacted args from the query we are making for this example if that is helpful
from contentful.py.
@kfleitman06 are you using the latest version of the library? If not, can you please update to the latest version and let me know if the problem persists?
from contentful.py.
Just realised you were waiting for a response here 😢
Yep we were on the latest version
I believe we ended up work arounding this by recursively accessing all referenced properties before sending the parent entry over as a response.
Would be good to not need to do this step though, any thoughts on this or anything else you need from our side to help on this one?
from contentful.py.
Related Issues (20)
- Option to disable automatic snake_case transformation
- maximum recursion depth exceeded issue when trying to retrieve entries HOT 14
- How can I include the version header? HOT 1
- python 3.8 support? HOT 3
- Cannot retrieve all localized fields HOT 2
- Sometimes Asset.url() return empty string
- Incorrect documentation for sync HOT 1
- Embedded Asset in rich text field is not localized when using locale's wildcard HOT 2
- Incorrect documentation for Search parameters
- Content type caching breaks for multiple spaces with same content type names HOT 5
- Contentful Python "Create Issue" button links to Contentful Ruby issues page. HOT 1
- Fields with same names overwrite Entry attribute values and types (e.g. content_types) HOT 2
- Fetching an entity recursive builds forever - hanging forever
- Cannot delete an Entry HOT 1
- Is this project still active? HOT 1
- Python EOL Version Support HOT 4
- Unicode payloads are not being encoded correctly HOT 1
- Embedded videos within rich text fields do not get properly serialized when calling `.raw` on the entry HOT 1
- Using the Contentful Python client adds significant latency HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contentful.py.