Questions tagged [ming]

Ming is an Object Document Mapper for the python/mongodb. It facilitates the mapping of MongoDB documents to Python objects, and offers the ability to enforce and or validate the documents that are put into MongoDB.

28 questions
4
votes
1 answer

Connecting to mongodb in a testable way

I'm planning to write a webapp in python using Flask and MongoDB (and probably Ming as ODM). The problem is I would like to keep my model and controller really well separated, one reason for this would be to be able to run simple unittests on the…
Blubber
  • 2,214
  • 1
  • 17
  • 26
3
votes
0 answers

Mingw64 Installation added an Pyhton Version! How can I remove the mingw64 Python and keep mine?

I have Python 3.8.10 64bit(win10) installed. I'm using it with VSC. Also for c/c++ I have installed mingw64. Mingw64 installs a python version to, dont know why and for what, but it is already making problems. Because the mingw64 installation is a…
lost_zorro
  • 31
  • 1
3
votes
1 answer

_BitScanForward64 returns wrong answer in c++.exe (rubenvb-4.7.2-release)

Long time MSVC user, new to gcc (so bear with me). I am using the rubenvb version of c++ (see version in subject, yes I'm building for 64bit) on Windows 7 and I'm having a problem using _BitScanForward64. Some sample code looks like this: int…
David Wohlferd
  • 7,110
  • 2
  • 29
  • 56
3
votes
3 answers

Ming 0.3.2 Installs and Imports but Crashes

After installing Ming 0.3.2, I tested the installation by running the following code: >>> from ming.datastore import DataStore >>> bind = DataStore('mongodb://localhost:27017/', database='tutorial') Traceback (most recent call last): File…
2
votes
1 answer

ld.exe, final link failed: Permission denied - write access: yes, process still running: no

I have a strange error. It popped out of nowhere. I was happily building (Eclipse + MingW) and suddenly on one build I got this message c:/mingw/mingw32/bin/ld.exe: final link failed: Permission denied Normally this happens in these two…
blubberbernd
  • 3,641
  • 8
  • 35
  • 46
2
votes
1 answer

How to find by _id in ming?

I have a mapped class in ming from ming import Session, create_datastore from ming import schema from ming.odm import ODMSession from ming.odm.mapper import MapperExtension from ming.odm.property import ForeignIdProperty from ming.odm.property…
finiteautomata
  • 3,753
  • 4
  • 31
  • 41
2
votes
2 answers

Where can I find a working winnt.h? Rubenvb's appears to be very wrong

Looking thru the definitions in winnt.h from rubenvb's 4.7.2 download (c++.exe --version is rubenvb-4.7.2-release) reveals a number of routines with inline assembly that simply don't work correctly. At least they don't on my i7 processor (could…
David Wohlferd
  • 7,110
  • 2
  • 29
  • 56
1
vote
1 answer

How to Compile XGBoost using MinGW

I am following the instructions given here and here to get XGBoost for Python running on my Windows 10. I have installed Git for Windows, but I get the error below when I try the next steps: $ cp make/mingw64.mk config.mk; make -j4 cp: cannot stat…
Krantz
  • 1,424
  • 1
  • 12
  • 31
1
vote
1 answer

Declare model before create connection in ming

I want delcare my models before make connection with database (for some reason like multi-threading, and dynamic load of database config uri). Documentation say to use like that: from ming import create_datastore from ming.odm import…
bux
  • 7,087
  • 11
  • 45
  • 86
1
vote
1 answer

mingw32-make can not be found in environment variables

I want to use install xgboost on my windows 7. but before that, when i installed MinGW-W64, it needed to use make command and when i type which mingw32-make in my git bash, it said that there is no mingw32-make in my Path ( although i gave an…
Saeid Hedayati
  • 83
  • 1
  • 3
  • 12
1
vote
0 answers

When PyMongo throws a DuplicateKeyError How can I tell what field caused the conflict?

Using Ming and PyMongo I have created several documents with more than one unique index. If a DuplicateKeyError is thrown, then I want to query for the conflicting document. Is there a way for me to take a DuplicateKeyError exception and know what…
K Engle
  • 1,322
  • 2
  • 11
  • 23
1
vote
1 answer

how to generate a slideshow in swf format from python?

how to generate a sildeshow in swf format from python/django? basically i have a list of images and text and I would like to use python to generate a swf file. I checked seems using MING or PyAMF is the direction to go but I dont quite understand…
user2673206
  • 215
  • 2
  • 12
1
vote
1 answer

Connecting to a MongoDB replica set using Ming

I'm using Python to connect to MongoDB and using Ming (http://merciless.sourceforge.net/tour.html) to keep the data model consistent. It has some nice features that I really like, but unfortunately seems to have removed support for replica sets as…
William White
  • 81
  • 1
  • 4
0
votes
1 answer

Ming MapperExtenstions usage

from ming.odm.mapper import MapperExtension class MyExtension(MapperExtension): def after_insert(self, obj, st): print "instance %s after insert !" % obj class MyMappedClass(MappedClass): class __mongometa__: session =…
lwolf
  • 960
  • 9
  • 16
0
votes
1 answer

sorting by a related item with ming on mongodb

setup A TurboGears2 project using ming as an ORM for mongodb. I'm used to working with relational databases and the Django ORM. question Ming claims to let to interact with mongodb like it's a relational database and a common thing to do in a…
rennat
  • 2,529
  • 3
  • 26
  • 30
1
2