MetaData Sharing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
759 B

  1. import pasn1
  2. from medashare import cli
  3. import datetime
  4. import uuid
  5. persona = cli.Persona()
  6. persona.generate_key()
  7. cbr = persona.get_identity().uuid
  8. storename = 'sample.data.sqlite3'
  9. objst = cli.ObjectStore.load(storename)
  10. list(map(objst.loadobj,
  11. [
  12. {
  13. 'type': 'metadata',
  14. 'uuid': uuid.UUID('3e466e06-45de-4ecc-84ba-2d2a3d970e96'),
  15. 'created_by_ref': cbr,
  16. 'modified': datetime.datetime(2019, 5, 31, 14, 5, 3),
  17. 'dc:creator': [ 'John-Mark Gurney' ],
  18. 'hashes': [ 'sha256:91751cee0a1ab8414400238a761411daa29643ab4b8243e9a91649e25be53ada', 'sha512:7d5768d47b6bc27dc4fa7e9732cfa2de506ca262a2749cb108923e5dddffde842bbfee6cb8d692fb43aca0f12946c521cce2633887914ca1f96898478d10ad3f' ],
  19. 'lang': 'en'
  20. }
  21. ]
  22. ))
  23. persona.store('sample.persona.pasn1')