How can I add a class to a block with code (development) For theming reasons I'd like to add a specific class at the "block" level to some of the blocks I'm generating with a custom module. I know there is a module block class, but I would rather like to do it directly in code (there is no need to change is afterwards). 

I also know of hook_block_view_alter, but that does not seem to allow adding or editing classes.

Is it possible to add a class with to a block from within my module code? I'm using Drupal 7.
Simply, you could use a preprocess function.

function YOURTHEME_preprocess_block(&amp;$vars) {
  if ($vars['block_html_id'] ==  'ID-YOUR-BLOCK') {
    $vars['attributes_array']['class'][] = 'YOUR-CLASS';
  }
}