Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(8)  |  Derive(0)  |  Import(4)

src/m/a/maxminddb-0.3.3/maxminddb/reader.py   maxminddb(Download)
 
from maxminddb.compat import byte_from_int, int_from_byte, ipaddress
from maxminddb.decoder import Decoder
from maxminddb.errors import InvalidDatabaseError
 
 
        metadata_start += len(self._METADATA_START_MARKER)
        metadata_decoder = Decoder(self._buffer, metadata_start)
        (metadata, _) = metadata_decoder.decode(metadata_start)
        self._metadata = Metadata(**metadata)  # pylint: disable=star-args
 
        self._decoder = Decoder(self._buffer, self._metadata.search_tree_size

src/m/a/MaxMind-DB-Reader-python-HEAD/maxminddb/reader.py   MaxMind-DB-Reader-python(Download)
 
from maxminddb.compat import byte_from_int, int_from_byte, ipaddress
from maxminddb.decoder import Decoder
from maxminddb.errors import InvalidDatabaseError
 
 
        metadata_start += len(self._METADATA_START_MARKER)
        metadata_decoder = Decoder(self._buffer, metadata_start)
        (metadata, _) = metadata_decoder.decode(metadata_start)
        self._metadata = Metadata(**metadata)  # pylint: disable=star-args
 
        self._decoder = Decoder(self._buffer, self._metadata.search_tree_size

src/m/a/maxminddb-0.3.3/tests/decoder_test.py   maxminddb(Download)
 
from maxminddb.compat import byte_from_int, int_from_byte
from maxminddb.decoder import Decoder
 
if sys.version_info[:2] == (2, 6):
        db.write(input)
 
        decoder = Decoder(db, pointer_test=True)
        (actual, _,) = decoder.decode(0)
 
    def test_real_pointers(self):
        with open('tests/data/test-data/maps-with-pointers.raw', 'r+b') as db_file:
            mm = mmap.mmap(db_file.fileno(), 0)
            decoder = Decoder(mm, 0)
 

src/m/a/MaxMind-DB-Reader-python-HEAD/tests/decoder_test.py   MaxMind-DB-Reader-python(Download)
 
from maxminddb.compat import byte_from_int, int_from_byte
from maxminddb.decoder import Decoder
 
if sys.version_info[:2] == (2, 6):
        db.write(input)
 
        decoder = Decoder(db, pointer_test=True)
        (actual, _,) = decoder.decode(0)
 
    def test_real_pointers(self):
        with open('tests/data/test-data/maps-with-pointers.raw', 'r+b') as db_file:
            mm = mmap.mmap(db_file.fileno(), 0)
            decoder = Decoder(mm, 0)