How do I programatically create a Bean 'instance' in code? I am trying to make a sort of hook_setup_beans() function (similar to hook_setup_blocks()) to create some bean instances by default when a user turns on a bean_example module I am making. This would be called from hook_install().

Is there a standard path for doing this?

I am playing with bean_create() and bean_save() right now.

Thanks

p.s. I also asked this at https://drupal.org/node/2173783
Creating bean instance programmatically.
https://drupal.org/node/1436186

&lt;?php
  $bean = bean_create(array('type' =&gt; 'my_bean_type'));
  $bean-&gt;label = 'Administrative Label';
  $bean-&gt;title = 'Bean Title';
  $bean-&gt;delta = 'bean-machine-name';
  $bean-&gt;field_block_content = array(
    'en' =&gt; array(array(
      'value' =&gt; '&lt;p&gt;Text&lt;/p&gt;',
      'format' =&gt; 'wysiwyg_editor',
    )),
  );
  $bean-&gt;save();
?&gt;