Commit Graph

230 Commits

Author SHA1 Message Date
Mike Dirolf
f157a35377 allow writing unicode to GridFS if an encoding attribute has been specified PYTHON-100 2010-08-31 12:25:45 -04:00
Mike Dirolf
9ddabb9b0b add gridfs get_version method PYTHON-115 2010-08-30 16:26:09 -04:00
Mike Dirolf
8098845c0e add readline to GridOut PYTHON-157 2010-08-20 11:26:36 -04:00
Mike Dirolf
b4fe7faefc only need _id for exists 2010-08-17 16:55:06 -04:00
Mike Dirolf
1cfa801f02 add file_document param to GridOut to initialize from existing file doc PYTHON-117 2010-08-16 17:09:45 -04:00
Mike Dirolf
a3a8cf2d79 BUMP 1.8 - see changelog for details 2010-08-05 10:04:37 -04:00
Mike Dirolf
a264d75483 towards pep8 2010-07-22 11:38:22 -04:00
Mike Dirolf
dc44f54a53 exists indexing note 2010-06-22 16:19:44 -04:00
Mike Dirolf
169ec824dc add GridFS.exists method PYTHON-132 2010-06-22 10:51:04 -04:00
Mike Dirolf
2bb4d67c12 BUMP 1.7 - see changelog for details 2010-06-17 12:46:33 -04:00
Mike Dirolf
790f87be4a actually, keep using subtype 2 as default for a while 2010-06-17 11:37:19 -04:00
Mike Dirolf
101cd109da continue to use subtype 2 for GridFS, since filemd5 was only updated to handle other subtypes in 1.5.x 2010-06-16 14:39:13 -04:00
Mike Dirolf
280a38681c more aggressive about index creation w/ gridfs 2010-06-01 15:53:23 -04:00
Mike Dirolf
ca95b49e0e save file document in safe mode for GridFS, so we can raise an exception on duplicates 2010-05-11 10:22:16 -04:00
Mike Dirolf
b700ba2b0f use filename for attribute, don't map from name to filename transparently 2010-04-15 15:11:50 -04:00
Mike Dirolf
f2029b175c BUMP 1.6 -- see changelog for details 2010-04-14 17:14:34 -04:00
Mike Dirolf
ef37e52067 move metadata to file object itself 2010-04-05 10:49:05 -04:00
Mike Dirolf
bec638f6f5 make GridOut an iterator returning chunk sized strings 2010-04-02 10:37:37 -04:00
Mike Dirolf
f25af4d7ee minor: 1.5.1+ -> 1.5.2+ 2010-03-31 11:42:00 -04:00
Mike Dirolf
13d2185869 raise NoFile on non-existant filename 2010-03-30 10:20:10 -04:00
Mike Dirolf
76afcbaaf6 more tests for gridfs 2010-03-29 15:32:02 -04:00
Mike Dirolf
3724b2091c support for writing from file-likes 2010-03-29 15:32:02 -04:00
Mike Dirolf
0997fbf9e8 some tests and fixes for new gridfs api 2010-03-29 15:31:50 -04:00
Mike Dirolf
0baad44c7e doc improvements 2010-03-29 15:31:49 -04:00
Mike Dirolf
a384561087 towards a new gridfs api 2010-03-29 15:31:37 -04:00
Mike Dirolf
10adc54148 use distinct for gridfs.list 2010-03-23 16:51:26 -04:00
Mike Dirolf
b989e3e34d improvements to the db.command api 2010-03-19 16:17:59 -04:00
Mike Dirolf
35f52cc31d BUMP 1.5.1 -- see changelog for details 2010-03-17 10:48:18 -04:00
Mike Dirolf
97b91b7e4a minor: doc 2010-03-17 10:45:24 -04:00
Mike Dirolf
786f1de795 add _id property to GridFile instances 2010-03-17 10:06:50 -04:00
Mike Dirolf
4817ba8770 BUMP 1.5 -- see changelog for details 2010-03-10 14:12:20 -05:00
Mike Dirolf
ea2a2b6abd dochub links 2010-02-05 14:24:26 -05:00
Mike Dirolf
b09a95ccc1 fix for chunk number calculation when unaligned - thanks to Daniel Lundin for the patch 2010-02-05 09:51:44 -05:00
Mike Dirolf
3d7240e57f It's 2010! 2010-01-30 10:48:26 -05:00
Mike Dirolf
14cf51148f add GridFSError as base exception class for gridfs errors 2010-01-27 15:50:04 -05:00
Mike Dirolf
08eb76327e use property decorator now that we're no longer supporting 2.3 2010-01-27 15:14:47 -05:00
Mike Dirolf
fdbded0ec8 removing things that were there for Python 2.3 and start taking advantage of 2.4 - clean up imports 2010-01-27 15:03:31 -05:00
Mike Dirolf
580c8f256a minor: clean up and docs for gridfs 2010-01-26 16:40:02 -05:00
Mike Dirolf
d80de9cb13 minor: remove all uses of types module 2010-01-26 13:31:36 -05:00
Mike Dirolf
78c825b548 DEPRECATE db._command in favor of db.command, which is now part of the documented API 2010-01-04 10:34:43 -05:00
Mike Dirolf
99f08e541e DEPRECATING method style access for several methods:
Connection.host() and port(), Database.connection() and name(),
and Collection.database(), name() and full_name(). Use attribute/property
style access for all of these instead now.
2009-12-15 17:04:24 -05:00
Mike Dirolf
a1c00f2b43 minor: these constants make more sense in grid_file.py 2009-12-04 10:41:22 -05:00
Mike Dirolf
7fb44ebb6b minor: cleanup, tests and doc for last commit 2009-11-30 10:28:45 -05:00
serbaut
8ccc0f724b cleanup
Signed-off-by: Mike Dirolf <mike@10gen.com>
2009-09-22 17:20:50 -04:00
serbaut
df7ee8e618 * no longer keeps the whole file in memory for write
* cache chunk_size so we dont read the file each time
* dont modify user file_spec argument

Signed-off-by: Mike Dirolf <mike@10gen.com>
2009-09-22 17:20:34 -04:00
Mike Dirolf
d73782a332 fix for gridfs seek on Python < 2.5 2009-08-24 12:07:03 -04:00
Michael Stephens
a4843bb71e implement seek and tell for (read mode) GridFile
Signed-off-by: Mike Dirolf <mike@dirolf.com>
2009-08-20 22:15:24 +08:00
Mike Dirolf
0ac83e46f7 API change: both insert and save return inserted _id(s) 2009-07-28 17:28:14 -04:00
Mike Dirolf
a04d64c445 minor: fix doc warning 2009-07-13 12:33:13 -04:00
Mike Dirolf
239ef555c7 GridFile supports the context manager (with statement) protocol 2009-07-08 13:05:36 -04:00
Mike Dirolf
1465bb1fea minor: doc 2009-07-08 11:43:25 -04:00
Mike Dirolf
14154ac346 fix for gridfs with non-ObjectId _ids 2009-07-08 10:54:18 -04:00
Mike Dirolf
0a9c5b3905 use ensure_index 2009-07-06 18:13:12 -04:00
Mike Dirolf
5e968f0cad make gridfs thread safe 2009-07-06 18:12:49 -04:00
Mike Dirolf
9edafa2167 make sure we're using utc 2009-02-25 17:42:03 -05:00
Mike Dirolf
7bbb4a5133 python 2.3 support
mostly not using unittest.assertTrue and assertFalse.
also not using decorator syntax, and some missing built-ins (sorted, etc.)
2009-02-20 14:35:21 -05:00
Mike Dirolf
c1bcc668ca add md5 to gridfs files. one commented out test until the filemd5 command gets fixed 2009-02-18 12:03:58 -05:00
Mike Dirolf
a6b77c347b minor changes to appease pychecker 2009-02-10 09:55:19 -05:00
Mike Dirolf
49b1ecd591 write chunks before writing new file length 2009-02-05 15:09:55 -05:00
Mike Dirolf
57d7fce271 just check for subclass of dict, not (SON, dict). SON is now a subclass of dict 2009-02-04 13:38:36 -05:00
Mike Dirolf
b9acd8ff9f create index, use stored chunk_number instead of sorting each time, convert length to int 2009-02-03 10:54:32 -05:00
Mike Dirolf
dc874b932d default root collection: gridfs -> fs 2009-02-03 10:19:16 -05:00
Mike Dirolf
ff15368fcb gridfs 1.0 2009-02-03 10:09:13 -05:00
Mike Dirolf
57941f9166 towards gridfs 1.0: support metadata 2009-02-02 17:39:30 -05:00
Mike Dirolf
7507898476 towards gridfs 1.0 -> change collection structure / default naming 2009-02-02 17:14:05 -05:00
Mike Dirolf
a5ddab40db properly indent lists 2009-01-30 15:10:57 -05:00
Mike Dirolf
0462726907 documentation: use epydoc format for rST parameter lists 2009-01-27 11:01:26 -05:00
Mike Dirolf
9ee0089b02 doc 2009-01-27 10:27:35 -05:00
Mike Dirolf
f9117a1bd0 a couple of helpers for common gridfs use cases - the more raw operations can be done by using GridFile directly 2009-01-27 10:21:15 -05:00
Mike Dirolf
d0ab291aa3 doc 2009-01-27 10:20:20 -05:00
Mike Dirolf
b4e600c19f buffered reads 2009-01-27 09:07:12 -05:00
Mike Dirolf
25dd339219 save data as binary 2009-01-26 17:59:45 -05:00
Mike Dirolf
a304a4b998 seperate rename() method, make name property read-only 2009-01-26 17:52:04 -05:00
Mike Dirolf
e01d2ab6c0 doc 2009-01-26 17:20:24 -05:00
Mike Dirolf
c95f9823b0 test getters, fix chunk_size 2009-01-26 17:19:01 -05:00
Mike Dirolf
0d4f6acde1 reads on non-matching file specifiers raise IOError 2009-01-26 17:13:47 -05:00
Mike Dirolf
b28d20f8b1 more tests and a fix 2009-01-26 17:05:08 -05:00
Mike Dirolf
82b105c481 more tests 2009-01-26 17:02:15 -05:00
Mike Dirolf
7defe93a71 no __del__ 2009-01-26 17:01:45 -05:00
Mike Dirolf
cd86a107ea toward a gridfs module 2009-01-26 16:19:06 -05:00