Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

I am trying to write an enhanced field for mongoengine mapfield where it takes a defined enum and tracks the selection. Ideally, it locates and presents the enum when in python but saves the defined ...
Hojo.Timberwolf's user avatar
1 vote
1 answer
264 views

I'm trying to migrate from motor to pymongo's AsyncMongoClient. After doing some upgrading/installing on pymongo I am having the below error when running this import from beanie import Document ...
Masterstack8080's user avatar
0 votes
0 answers
43 views

I've installed these packages: python -m pip install pytest pytest-django And created a fixture: # core/services/tests/fixtures/checkout.py import pytest from bson import ObjectId from datetime ...
Amir Shabani's user avatar
  • 4,333
1 vote
0 answers
98 views

My company runs a Flask API connected to MongoDB on atlas. Currently, we have minimal logging and metrics and rely solely on Altas to monitor DB usage. This month we realized the DB is being queried ...
Lance's user avatar
  • 123
1 vote
1 answer
43 views

I started to use mongoengine library in order to read and write data from Mongo DB. I found some strage behavior. The following class is defined in my codebase: class CustomerRequest(BaseModel): ...
CrazySynthax's user avatar
  • 15.2k
0 votes
0 answers
32 views

How does one query a DictField to see if the keys contain a specific string. Originally the dictionary was used as it was easier to query or elements further in the tree. However, when expanding I ...
linkey apiacess's user avatar
0 votes
0 answers
54 views

I am trying to maintain a consistent datatype for my datetimes in a Mongo collection, where some come from PyMongo, and others come from flask-mongoengine. In Flask, the relevant model entry is: ...
James_SO's user avatar
  • 1,387
0 votes
1 answer
29 views

Context: I have a class as follows: class DisplayArtwork(Document): name = StringField(required=True) email = EmailField(required=True) country = StringField(required=True) phone = ...
wenbang's user avatar
  • 11
0 votes
1 answer
28 views

I am trying to interface with mongoengine and extract out posts based on different inputs. At first I was simply running a for loop with a modulatory query and running said query every time. However ...
linkey apiacess's user avatar
1 vote
0 answers
33 views

Is it possible to have a contains and exists call in the same query in mongodb, specifically mongoengine for python? The data I need to parse is stored in a mapfield where I need to go into the keys ...
linkey apiacess's user avatar
0 votes
1 answer
55 views

I am trying to store temporal data in mongodb with the use of mongoengine. As the date of the data is a primary component, I thought it would be best to map the data to the date. However, when ...
linkey apiacess's user avatar
2 votes
1 answer
131 views

I have a mongoengine document such as: from mongoengine.document import Document from mongoengine import StringField class Class_A(Document): field_a = StringField() field_b = StringField() ...
alex's user avatar
  • 11.4k
0 votes
1 answer
50 views

I have an existing database of data that I want to use with MongoEngine. I updated the class as follows: class World(Document): user = ReferenceAttr(choices=["User"], required=True) ...
stevenamoore's user avatar
0 votes
1 answer
130 views

I have the following MongoDB document-class defined with mongoengine: class Archive( mongoengine.Document ): user_id = mongoengine.StringField() transaction_ids = mongoengine.ListField(...
IronPillow2's user avatar
0 votes
0 answers
27 views

I have the following schema: class Feature(EmbeddedDocument): feature_name = StringField(required=True) geometry = PolygonField(required=True) id = ObjectIdField(required=True, default=...
tvoirand's user avatar
  • 440
0 votes
1 answer
296 views

I have production code that stores mongoengine.Documents with UUIDs like this: class TestEntry(Document): uuid_test = UUIDField(primary_key=True) The regular code works as intended: connect('...
fr22's user avatar
  • 3
1 vote
0 answers
40 views

I create DDD project in python and domain entities are mapped 1-1 to mongodb models. I have the following class class Experiment(Document, Entity): id: ExperimentId = ExperimentId.Field(db_field='...
JaktensTid's user avatar
1 vote
0 answers
223 views

The Python application I'm implementing works with the MongoDB database. I use the mongoengine module to connect and fetch data in my scripts (https://docs.mongoengine.org/). My collection in the ...
VIPPER's user avatar
  • 372
0 votes
1 answer
55 views

I have the following definition for an IntChoiceField: from mongoengine import IntField class IntChoiceField(IntField): def __init__(self, min_value=None, max_value=None, choices: list = None, **...
Amir Shabani's user avatar
  • 4,333
0 votes
1 answer
94 views

I have two documents and I would like to link together through a reference Field using the _ID. The idea was to create the documents, save them to the database, take the _ID information and append it ...
Hojo.Timberwolf's user avatar
0 votes
2 answers
399 views

I am using django with mongoengine. I am writing the following in the settings.py file: from mongoengine import connect URI = 'mongodb+srv://myusername:[email protected]/django?...
Dhritiman Tamuli Saikia's user avatar
-2 votes
1 answer
54 views

I use mongoengin in django app. each document in mongo has metadata that is dict and in it there is image address with out base_url. in django serializer I add base_url to it but it sometime get ...
Mahnaz Divargar's user avatar
0 votes
1 answer
71 views

I have some legacy MongoDB collection that has a particular field that can be null, a list ([]) and an object with a particular list of fields. I'm trying to implement the basic Document that allows ...
logoff's user avatar
  • 3,452
0 votes
0 answers
193 views

Environment: python: 3.8 mongodb: 3.4 (on docker container) mongoengine: 0.20.0 One collection in mongodb, DEVICE, with 104 documents populated. There are 9 ReferenceField attributes in the DEVICE ...
H.Sheng's user avatar
  • 481
-1 votes
1 answer
202 views

The mongo library used in my project is Mongoengine I often find the error 'pymongo. errors. CursorNotFound: Cursor not found' in the logs. After investigation, it was found that the mongo server ...
Dylan's user avatar
  • 37
1 vote
1 answer
2k views

I've updated the pymongo and mongoengine packages, which are now 4.6.0 and 0.27.0, respectively. After upgrading it On my Windows machine, I am trying to run celery tasks. In that celery task I have ...
kamlesh Bannagare's user avatar
1 vote
1 answer
92 views

I'm new in mongoengine and I'm trying to relate two documments. class Actor(Document): name = StringField(required=True, unique=True) movies = ListField() class Movie(Document): title = ...
Joey Fran's user avatar
  • 625
0 votes
1 answer
299 views

I am working with python-flask and mongodb. Things was working fine suddenly I am getting the below error mongoengine.errors.FieldDoesNotExist: The fields "{'__v'}" do not exist on the ...
Veera Silamban's user avatar
0 votes
2 answers
188 views

I am trying to run celery beat for my project, but it's giving me the following error. The celery worker is running fine. I am using Python 3.9 Using MongoDB: 6.0.11 raise ConnectionFailure(...
kamlesh Bannagare's user avatar
0 votes
1 answer
67 views

I have made two API's with Flask Admin and mongoengine, This is how my document is in the first API. class Score(db.Document): score = StringField(required=True) section= ReferenceField(...
Lord of the Strings's user avatar
2 votes
1 answer
58 views

Campaign Record { "_id": { "$oid": "64eb81337f7d9f6e1107fc3a" }, "_cls": "CampaignModel", "campaignNumber": "CMPN-00005&...
abak1802's user avatar
  • 107
0 votes
0 answers
214 views

I am using mongoengine with Django rest framework as my backend and simple jwt to authenticate the user. I am able to register/login the user successfully but when I use permission_classes of rest ...
Mayank's user avatar
  • 1
0 votes
1 answer
56 views

I have a project using GraphQL and Mongoengine. To update a specific element of an embedded list field I do not want to get the whole list from the client instead I want to get a new value and the ...
Muzaffer's user avatar
  • 137
0 votes
2 answers
328 views

I have Fast API with a Mongo Database I try to realize my tests for some functions which need mongo connection Here my collection users and its fields: from mongoengine import Document, EmailField, ...
Rickross's user avatar
0 votes
2 answers
162 views

I am trying to create a session_expiry time using Python and then inserting the session_expiry in mongo db using insert_one() method. once the data in inserted in mongodb, while querying the mongo ...
thelostsoul's user avatar
1 vote
2 answers
258 views

I am using Flask + MongoEngine (0.22.1). I have 2 document types, where I don't have any circular dependency: from mongoengine import Document, StringField, UUIDField, ListField from ...
Melih's user avatar
  • 814
0 votes
1 answer
49 views

app=Flask(__name__) CORS(app) app.config["MONGODB_SETTINGS"] = [ { "db": "UPTeam", "host": "10.64.127.94", "port"...
Akshay J's user avatar
  • 5,538
0 votes
1 answer
558 views

I'm using AWS DocumentDB service without TLS. So, I can connect to DocumentDB without pem key. Obviously I have easy access to DocumentDB from EC2, but I can't access it via Python code from my local ...
Jiseoup Lim's user avatar
2 votes
0 answers
36 views

Is there a way I can control the way pytest creates string representations from objects? specifically I am using mongoengine where the objects of type Document are just lazily outputed to console as &...
Aviad Rozenhek's user avatar
3 votes
1 answer
437 views

So, I have a Collection of documents (e.g. Person) structured in this way: class Person(Document): name = StringField(max_length=200, required=True) nationality = StringField(max_length=200, ...
oettam_oisolliv's user avatar
4 votes
1 answer
4k views

I have a python software that inserts uuids in a mongo database using this code: class User(mongoengine.Document): id = mongoengine.UUIDField(primary_key=True, required=True, default=lambda: str(...
Kiruahxh's user avatar
  • 2,213
1 vote
0 answers
36 views

I am working on a project in which I have a Company template which contains a name, url and an image under a Mongoengine Document. I would like to know how to store the image in the MEDIA folder ...
Basile ROUTIER's user avatar
0 votes
3 answers
788 views

I'm having a hard time struggling how to find out how to upsert in MongoDB using mongoengine. My current inserting code looks like this: for issue in data['issues']: doc = Issue( key=...
rebellion's user avatar
  • 6,738
0 votes
1 answer
316 views

I want to add documentation for the Django app I use rest_framework_mongoengine, rest_framework OpenAPI 3.0, drf-spectacular swagger model : from mongoengine import * class Service(Document): ...
ammar Yasser's user avatar
0 votes
0 answers
45 views

I have a site in production using: Flask, Gunicorn, MongoEngine and I'm facing duplicate data processing error due to too many requests per second on certain routes. Example code: @app.route('/...
Mattew Silva's user avatar
1 vote
0 answers
136 views

I am new to django and am using mongoengine. I am trying to create an employee database using DRF. All of the APIs are working well but whenever I am trying to fetch a single document which has been ...
Kumar Sagar Maiti's user avatar
1 vote
1 answer
128 views

In mongoengine there are pull and unset commands. These allow you to remove values from a list if you provide them with a value to match against or the entire list. While that works without an issue ...
x...'s user avatar
  • 29
0 votes
2 answers
108 views

Trying to send a lot of data to MongoDB through MongoEngine. I start with a DataFrame that I write to JSON like this: result = df.to_json(orient="index") parsed = json.loads(result) ...
jmChrist's user avatar
0 votes
1 answer
71 views

I have a document on MongoDB that contains flight data records. This data goes back 4 years , and is mixed up in the flight_records array shown in the sample below. I want to split this document into ...
SATA_CHAKRA's user avatar
1 vote
0 answers
108 views

I have some images saved in mongodb and I used mongoengine and flask to save them. Now I want to make it json serializable so I can send it to a react frontend. This is the code that I used to decode ...
Rimzan's user avatar
  • 11

1
2 3 4 5
37